32,204 Topics
| |
[CODE]import java.io.*; public class Calculator{ public static void main(String[] args){ BufferedReader dataIn=new BufferedReader(new InputStreamReader(System.in)); int x=1, y=1; String Str_1,Str_2; System.out.println("Enter an Equation: "); try { Str_1=dataIn.readLine(); System.out.print("Enter another Equation: "); Str_2=dataIn.readLine(); x=Integer.parseInt(Str_1); y=Integer.parseInt(Str_2); x = x+y; x = x-y; x = x*y; x = x/y; } catch(ArithmeticException e) { System.out.println("Divide … | |
import java.util.*; class Matrice { private int[][] a; private int row; private int col; public static Scanner in() { return new Scanner(System.in); } public static void out(String m) { System.out.print(m); } public static int readInt(String m) { out(m); return in().nextInt(); } public Matrice() { row=2; col=2; a=new int[row][col]; } public … | |
I'm working on a program that first launches a frame with various text fields. After they are filled in, the information is submitted by simply clicking the submit button. I have the frame down, the text fields and the buttons, and I have the class where all my data and … | |
Okay. I'm in need of desperate help and really hope someone can help me type out the entire code for a simple basic java project. 1)adherence to java naming conventions 2)At least one static method other than main 3)providing int, double and string inputs 4)proper selection construct (switch-case or if-else) … | |
Hi All: I am using windows 2000 server with Eclipse. In the dost prompt, I ran the file run_sqlldrTest2.cmd and it loaded record into the Oracle database. I tried to do the same thing in java calling the run_sqlldrTest2.cmd. In java it states the "The command line job - -executed … | |
Hi, I want to create a typewrite/typing java app. I want to change the color of a text to be different, whenever the user types the wrong character in a JTextArea. For example, if the user was supposed to type "My Book" and s/he types "My Bok", I want the … | |
hi all how can i draw rectangle for each graphic. on the picture, each rectangle is create as graphic. pls help. | |
I have to create a GUI like Netica that can create decision networks (influence diagrams) I want to click on a rectangle icon and be able to drop it on the editor and make the rectangle bigger. How do I do that? I know it is drag and drop but … | |
So I have a JComboBox, which contains recipe names. I want, when the recipe name is changed, for the label that is an icon of the rating (1 to 5) stars, based on my recipe object, to change as well. My code seems like it should work perfect but it … | |
Ok so im basically new to computer vision, but i would love to expand my knowledge in java and do some computer vision stuff. So what would be the best library to use with lots of documentation and support? Essentially id like to do object tracking and see if there … | |
Well, I'm doing pretty good with my WebChat application, but I was thinking to add some smileys! At first, I would like the app to auto detect the smileys in standard form from a given string and place the image in its place, but I came across the problem: how … | |
Okay I would like to set a Mnemonic for a JButton so that if I press the right arrow key the button will be activated. However I can not find what the command for that would be. Right now I have it so that you can hold down alt+Right to … | |
i AM really new at java and i have just created a very simple diesign of something that is static but should play mp3 files, loaded the required jmf as well ...I want when i click on the jtable and then play song starts playing ..its is not happening here's … | |
Ok so basically I just wanted to see if anyone had any ideas for me. Basically I want to do a project in java because i havnt done one for ages. Im fluent in java so that means i can do relatively complicated things. Id prefer for some software ideas … | |
Hi, I'm really, really new to Java, but I've created a game, and in a separate file the GUI, but I don't know how to attach the functions of the program to the GUI. This is my program: [code] import java .util.*; class bust { public static void main (String … | |
Hi, We have a java web application where users will be submitting videos. I'm trying to write a java program that is able to convert any movie file into compressed SWF video and FLV streaming video formats. The code should convert almost all popular file extensions such as AVI, MPEG, … | |
Here i try to draw line by mouse pn panel but it is not appear here is my code: [ICODE] import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics; import java.awt.GridLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JComponent; import javax.swing.JFrame; import javax.swing.JPanel; public class … | |
Hi All, I hope someone can offer some help / advice. I need to plot a fairly simple line chart/graph, using some data generated previously from another Java program (run from the console) that is output to a text file. I'm really struggling trying to produce a viewable line chart/graph … | |
Hello, I'm learning Java ME and i was building an application that is a simple contact book, but in the main form it only have menus, because i don't know how i can list the registry's on it, remember that i want to list only the names in the list … | |
Hello, I'm learning Java ME and when i complete the development of an application that uses RecordStore, it's simple a contact book, but when i completed the code i see that my program have an error and i use Eclipse, then it marks wrong codes in the left of the … | |
The title says it all. Is it possible if so how would you code the kernel etc. Also is there an open-source project or something with the kernel etc already written? Again many thanks, jakx12. | |
If choice is [COLOR="Red"]1[/COLOR], user will be prompted to enter the month and then the person and salary earned. Total number of person entered should not exceed 8. An empty entry on the "Enter person" prompt should allow user to break out of the loop. //i have been stuck on … | |
Hello, Is there a way to center or offset a canvas component inside of a Java Frame (AWT)? I've tried a number of strategies based around frame.add(canvas), and whether I'm using a full screen frame of not, it's always aligning at the top left of the frame. Thanks for any … | |
I'm writing a WebChat application using the socket functions in java. I'm able to listen for incoming sockets on the server side and connect from the client side just fine, but I'm having a problem communicating from the client to the server to ALL the clients. Right now, I have … | |
i am a Bsc software engineering undergraduate , can any one tell me a project which is related to java service oriented architecture ? ,i am searching for a final year project. and i thought of doing it on java SOA if any one can suggest me a project topic … | |
Hello. I have an undecorated JFrame (Which is rather boring by itself), and I would like to know how to get a drop shadow effect for it. I have researched it, but I haven't found anything, anyone have any ideas? Thanks in advance!!! | |
Hello, I have a question, in my program I want to read a text field then to convert it to Color, How Can I do this ? I try this, but I didn't know if this is right : [code]String colorString = getCarTextButtons()[3].getText(); Color color = Color.getColor(colorString);[/code] | |
hi everybody, I'm having a problem on what to do next in my project. below is what i need to do. if any body let me know if i'm doing it right and if i need more classes. help on boolean, clone and finalize method. Thank you... A library needs … | |
Hi everyone! This code runs without throwing exceptions and stuff, but it doesn't exactly run when I click the "Submit" button -- what is supposed to happen is that I click it and it generates a random number. What happens is either nothing or if I get lucky and click … | |
Hello, I'm learning Servlets technology, but i'm already a Java developer and i want to know how i can develop a servlet that have two pages, the first is a page that have a button and two text fields, one field of title and the other a memo field, but … |
The End.