32,204 Topics
| |
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.*; … | |
[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; … | |
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 … | |
[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; … | |
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 … | |
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 … | |
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.. | |
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 | |
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 | |
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 | |
what is the difference between jakarta and apache Struts??? Thankzzz..... | |
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 … | |
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? … | |
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) … | |
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 … | |
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 … | |
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; … | |
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? | |
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? | |
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) … | |
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 … | |
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 … | |
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 | |
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 … | |
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 … | |
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 … | |
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 … | |
how do i add a jComboBox into jTable as one cell in the row Thanks Greg | |
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, … | |
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 … |
The End.