32,204 Topics

Member Avatar for
Member Avatar for spalax

Hi, i'm trying to read a simple email file from a folder in my computer. I find this code but, it's not working. i didn't understand theses lines: what should i write for mail.host? what should i write for "mail.transport.protocol", "smtp"? props.put("mail.host", "smtp.gmail.com"); props.put("mail.transport.protocol", "smtp"); [CODE] import java.util.*; import java.io.*; …

Member Avatar for spalax
0
3K
Member Avatar for stella44

[code]public class Intersection { private static String intersect[]= new String[3]; public static void main(String args[]) { // initialize Intersection intersect[0]="A"; intersect[1]="B"; intersect[2]="C"; for (int i=0; i<intersect.length ;i++) {System.out.println(intersect[i]);} Intersection inter= new Intersection(); System.out.print(inter.getIndex("C")); } //get index of intersection public int getIndex(String str) { for(int i=0;i<intersect.length;i++) { if(intersect[i].equalsIgnoreCase(str)) { return i; …

Member Avatar for VernonDozier
0
148
Member Avatar for tajtosh

I am developing an desktop application in which I need to use javafx and java both as I read on sun's site that, we can use objects of javafx classes within java programs but when I tried it, I didn't get how to? Can any body help me how to …

Member Avatar for kvprajapati
0
93
Member Avatar for caierhui

[code=java]//their is an error in my program... and i dont know what it is... //and i need to make two columns how can i do that? import java.awt.event.*; import javax.swing.*; import java.awt.*; import java.util.EventListener; public class Assign_1 extends JFrame { private JLabel quizOneL,quizTwoL,quizThreeL,quizFourL,AverageScoreL; private JTextField quizOneTF,quizTwoTF,quizThreeTF,quizFourTF,AverageScoreTF; private JButton calculateB, exitB; …

Member Avatar for sneaker
0
121
Member Avatar for fareast87

Greeting everyone.. This is my very first thread. I'm a final year student doing my thesis. I want to develop a software of Java that can encrypt an image so that it can be transformed to unreadable form. My idea is to transform the image file (i.e JPG, BMP) to …

Member Avatar for fareast87
0
181
Member Avatar for robben

I've developed function which allows to skip to a desired line number within a text file (see function). However, what I would like to do is develop a function which takes me to the beginning of the file (i.e. line 0) after calling the navigateForwardToLine function. However, I can't seem …

Member Avatar for sneaker
0
198
Member Avatar for hvardhan1000

How to get and set SNMP protocol variables of a router...? Is IP address really an SNMP variable ? Which method or what code should I use for sending the snmp GET and SET packets to that router? will socket programming be efficient? PLs give example..

0
47
Member Avatar for emint

hi all i got problem reading multiple table from ms access using jdbc. i read two table from one class but i got 12 table to read. so how can i do dat? any help will be great thank you

Member Avatar for emint
0
219
Member Avatar for loozax

How to make a code for this using multidimensional array in java: Underwear Unit Price Quantity Amount Brief 10.00 5 50.00 Panty 5.00 20 100.00 Bra 25.00 1 25.00 TOTAL AMOUNT: 175.00

Member Avatar for Godstryke
0
188
Member Avatar for loozax

a JAVA program that would input a string and display the total number of vowels and total number of consonants. (use method) Example: Input a string: beautiful Total Vowels: 5 Total Consonants: 4

Member Avatar for Godstryke
0
188
Member Avatar for ajithraj
Member Avatar for amu25

hello! m new to java.i want to create an application that accepts length x width from combo box.there are 100 values.i want to draw a rectangle whose size will change for each value in a combo box depending on its length and width. which method should i use? can any …

Member Avatar for amu25
0
148
Member Avatar for Anon17

I need to convert a byte array to a string, and it's working perfectly except for a few values. [code] byte[] b = {(byte)0x8D}; String s = new String(b); [/code] Instead of adding the value 8D to the string, it adds the value 3F. Any ideas why this doesn't work? …

Member Avatar for nmaillet
0
106
Member Avatar for mahdi68

Hi I'm novice in ubuntu , i'm using NetBeans IDE for j2me programming but i have a praoblem : emulator do not work !!! when i'll run program dose not work and this message is displayed : [CODE]java.lang.UnsatisfiedLinkError: /home/mahdi/netbeans-6.7/mobility8/WTK2.5.2/bin/sublime.so: /home/mahdi/netbeans-6.7/mobility8/WTK2.5.2/bin/sublime.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch) …

Member Avatar for peter_budo
0
397
Member Avatar for sean624214

A Sports Management Application is required to process the results of sports competitions (e.g. Asian Youth Games). You are assigned to develop a simple Java program to demonstrate the functions provided by the system. A sample of the result of a sports competition shown in Figure 1 below: Country Gold …

Member Avatar for javaAddict
0
156
Member Avatar for majestic0110

Hi all, I hope you are well. I am in the process of building a small Java application that reads data in from a unicode text file (.txt) and processes it into a jTextArea. The trouble I am having is that the unicode file contains some Greek characters, most of …

Member Avatar for majestic0110
0
227
Member Avatar for TheWhite

This is the snippit im having a problem with. I've tried playing with the preferred size of both the JList and the JScrollPane with no luck/mixed results. I want to be able to size it to exactly 1 size so it never changes. [CODE=JAVA] import java.awt.BorderLayout; import javax.swing.DefaultListModel; import javax.swing.JFrame; …

Member Avatar for TheWhite
0
1K
Member Avatar for NavyMan

I am using Eclipse release 3.4.2 and am getting a popup error saying: "Could not find main class. Program will exit." In the console the error says: "java.lang.NoClassDefFoundError: Inventory" "Exception in thread 'main'" Is there any other information that would be needed to help with this?

Member Avatar for NavyMan
0
188
Member Avatar for Whilliam

Hello. Im new to Java and I have a question. I wanna access another class (e.g. the name of the class is Person) from class Main. I wanna access specifically, the main of class Person. How do I do that?

Member Avatar for Whilliam
0
118
Member Avatar for Gueito

I am having an issue where with my program and reading all the posts on your site has been VERY useful in understanding this project thank you! Now for my issue i am having trouble getting the buttons to recognize the class provided for them. For instance (i use Netbeans) …

Member Avatar for Freaky_Chris
0
141
Member Avatar for NavyMan

I realize this code has been seen a million times already. I am trying to 'start' on part 3 of this. I do not wish for it to be done for me just a starting point for this subclass. These are the directions: Modify the Inventory Program so the application …

Member Avatar for BestJewSinceJC
0
108
Member Avatar for andrewjm

I am trying to create a program that will store user input into nodes of a linked list. I want the user to only have to input the data they wish to be stored, so I am trying to figure out a way to automate the naming of the new …

Member Avatar for BestJewSinceJC
0
109
Member Avatar for mzprog

Dear All, I have a problem, i need to align all components(JLabel,JTextField,etc) to right in the JPanel. Is there any layout method which can set the layout of the jpanel and then adding any jcomponent is aligned as the JPanel. thanx in advance

Member Avatar for BestJewSinceJC
0
258
Member Avatar for Acegikmo

I am currently writing a weapon class and a projectile class, to use in a top-down game. However, I can't seem to be able to load images in a class. It works in the main function, where I do it like this: [CODE]Image bulletImage =getImage(getCodeBase(),"bullet_machinegun.png");[/CODE] However, this doesn't work inside …

Member Avatar for llemes4011
0
108
Member Avatar for arj19

Hi I need to know some basic information here. I want to develop a small software which I want to market as a product on CD. Please can anyone let me know the basic steps of how to go about it? I have experience in programming but I do not …

Member Avatar for swinefish
0
91
Member Avatar for KimJack

Hi, I really hope that someone can give me a little advice. I am working on a program that reads a text file formatted as follows: Bike, Schwinn, 45.00 Car, Mercedes, 98,000 ... I am writing a program that will read this text file and write each item in a …

Member Avatar for KirkPatrick
0
118
Member Avatar for Dewy

hi..... This is Shabnam and i wanna make a major project in java..........we have 1 year of time to complete it,in which first half v will concentrating in analysis & design and next half months on coding......... So plz suggest me few topics which are quite intresting.......coz its weightage is …

Member Avatar for DangerDev
0
62
Member Avatar for GregStoltz
Member Avatar for KirkPatrick
0
67
Member Avatar for soheilshoolookh

hi everyone, I'm to some extent beginner in java. first of all let me explain a bit about our project and then I will explain the problem. In our project there are Agent programs sending their Data via UDP connections to the Server program, Server performs some math on data, …

Member Avatar for quuba
0
294
Member Avatar for emint

hi i got problem in ma program. in my pro i got main window when i click on "Maze 1" button it create maze. it worked fine. when maze is created i slove maze. then i close to return main window. now when i hit the "maze 1" button it …

Member Avatar for emint
0
112

The End.