32,199 Topics

Member Avatar for
Member Avatar for shean1488

Hi everybody I have a little question. I am using JFileChooser to open file and then process it.But the thing is its only works for txt file. What are the other ways to open all ither text files. Plus if would be really helpful if you would tell me how …

Member Avatar for shean1488
0
290
Member Avatar for Eye_Kneed_Help

Hey Everyone, I'm new to JCreator and trying to compile this program, however I keep getting "missing return statement"...please help. import javax.swing.JOptionPane; public class DoCount { public static void main(String[] args) { String nString=JOptionPane.showInputDialog("Enter n:"); int n = Integer.parseInt(nString); factorial(n); } public static int factorial(int n){ int count = n; …

Member Avatar for ztini
0
249
Member Avatar for DanHu

Hi, I am trying to create a binary tree from a string read from a file. The string contains information that tells which is the new left and right nodes, and the node which new these nodes are to be added (assuming there is a root node in the tree …

Member Avatar for ztini
0
531
Member Avatar for maxinville

Hello everybody, I am new to Java, I am creating a simple application that will insert into my database, but what I really want is, I have a class called product which contains the jTextfields of the product description and product qty and a button called test, and I also …

Member Avatar for maxinville
0
679
Member Avatar for JHoover10

This is what I need my program to do: 1. Ask the user to enter the number of points. 2. Ask the user to enter x and y positions for each point. Store the positions in a 2-D array. What should the dimensions of the 2-D array be? 3. Compute …

Member Avatar for SW7
0
1K
Member Avatar for DOMINATIONINPRO

Allo. I am finishing up my coding project and I am going nuts trying to figure out what I'm doing wrong. I thought I finished my ISBN checker code properly, but when I finish imputing the ISBN number that is valid, I get "The ISBN number is valid", but I …

Member Avatar for JamesCherrill
0
122
Member Avatar for tabish saroha

Dear All, I want to develop a network application in java based on HTTP.. In which one server and other is client application..... The problem is that, How can I check whether a server ip address is valid or not ? Please tell me... I am very thankful to you.... …

Member Avatar for DavidKroukamp
0
202
Member Avatar for Yarra

[B]I have a timer class that prints out a string every 5 ticks, and on the 6th tick it runs a random event. now what i want is to have the timer to restart from 9 ticks. As i tried to do with the else statement in the MyTask Class …

Member Avatar for Yarra
0
177
Member Avatar for london-G

Hello I added a jpanel form on top of my game. I would like to implement a timer. How can I do that? I already imported the timer in the class but I don't know how to proceed.

Member Avatar for JamesCherrill
0
43
Member Avatar for vuquanghoang

I have a homework. My teacher requires me to do a project which use Link base binary tree. I do almost all needed function but still remain print method. It throws StackOverFlow every time I complile project. I know since the print method but, I have a base case to …

Member Avatar for NormR1
0
247
Member Avatar for Usoda

I have a Product class that is the parent of 3 other classes; Books, Movies, Music. And the Product class connects to the Store class that holds the Store's location. If I need to find a certain Product I have to traverse the list of each the Store class and …

Member Avatar for JamesCherrill
0
188
Member Avatar for autorunman22

I cant digest the problem, please help me a bit. [code]You will develop three Java classes that interact with each other: Cashier, PriceAndStockManager and Product. Cashier objects are in charge of front-office operations, particularly purchases. These cashiers use a PriceAndStockManager object in charge of back office operations. This object provides …

Member Avatar for JamesCherrill
0
206
Member Avatar for Kert

Hey, I have a task to do a program that can transfer Latin word to Morse and I need to read the connection between the letters from a txt file and save both of them to differnet lists (soned and morse) and later return an ArrayList that contains them both. …

Member Avatar for Kert
0
127
Member Avatar for dvspinay

Here is my assignment: > Here is your assignment: You work for a Landscape architect. They have asked you to be a part of their team as they need a computer programmer, analyst, and designer to aid them in calculating engineering specification. Specifically, you have been assigned to the Pools, …

Member Avatar for bedwards0978
0
340
Member Avatar for Zennie2005

Hello everyone, I am having an issue with my code, null pointer exception error. It says lines 24 and 75 are the issue, but I am not exactly sure what the problem is. Can anyone help with some suggestions as to what I might be doing wrong ? Much appreciated. …

Member Avatar for zeroliken
0
147
Member Avatar for chuffedlion

I'm just wondering whether using socket is the only way to build communication mechanism of a p2p system? Thank you in advance.

Member Avatar for NormR1
0
26
Member Avatar for london-G

Hello, I am creating a game, where I have 4 classes. The Game(main class), the player, level1 and level2. I have created an object(key) on the level1 class. Now I want the key to disapear when the player touches it. I have implemented the collision listener on my level1 class …

Member Avatar for JamesCherrill
0
32
Member Avatar for Gazzmonkey

Finally getting into concurrent programming but it's not easy for the novice like me, after all this work I still cannot get a successful compilation!!! A simple roundabout (traffic circle) is a circular junction of four streets where traffic flows in a one-way and one-lane circular stream around a central …

Member Avatar for JamesCherrill
0
800
Member Avatar for Na'Vi

Hi, I'm trying to make a menu and when you click on one of the JButtons, it'll go from my first class's GUI to my second class's GUI. But when I run the program, and I press the button algorithm, it changes to a blank screen, and not to the …

Member Avatar for Na'Vi
0
71
Member Avatar for shean1488

Hi everybody! Help me plz to figure out obe little thing. so imagine little window with 4 buttons and a JLable. I want to ask how to add JLable to the panel and not give it a Grid Layout. I mean that I want my JLable be under 4 buttons. …

Member Avatar for shean1488
1
122
Member Avatar for adil_bashir

can we return 7 elements of an int array using return statement. if not, please help?

Member Avatar for NormR1
0
98
Member Avatar for adil_bashir
Member Avatar for hasan_cemos

Hello! How can i capture a screenshot of desktop with mouse? I can get a screenshot with robot.createScreenCapture but it does not show me also the cursor (mouse) ... Thank you!

Member Avatar for hasan_cemos
0
73
Member Avatar for Jeun

*None of the buttons except create and clear work can someone help please , can anyone help me with the parts i have missing , the account and date test class work fine i just need the bank account GUI to work properly , here is a detailed explanation of …

Member Avatar for stultuske
0
2K
Member Avatar for rampletero

I need help on drawing numbers on top of a rectangle matrix, and have them move together with the rectangle they are on. I tried doing this [code]public void paintComponent(Graphics g) { super.paintComponent(g); Graphics2D g2 = (Graphics2D) g; for(int row = 0; row < tiles.length; row++) { for(int col = …

Member Avatar for NormR1
0
196
Member Avatar for xcrypted1

*Edit* Just so you know, we are on the chapter in the book introducing ArrayLists *Edit* I am having trouble with this problem. The problem is stated: Implement a class Polygon that contains an array list of Point2D.Double objects. Support methods public void add(Point2D.Double aPoint) public void draw(Graphics2D g2) Draw …

Member Avatar for NormR1
0
574
Member Avatar for moonL!ght

hellow every one im facing problem in my coad wich i tried to understand what is the mistake of my symantic but no progress..... this is the code [CODE] private static void NNA(ArrayList<triple> Graph,String GoalN) { ArrayList<triple> vp= new ArrayList<triple>(100); int index=0;// the index of the nodes in the visited …

Member Avatar for JamesCherrill
0
264
Member Avatar for arathy nair

Hi all, I have a situation where am using String conditions(say if(name.equalsIgnoreCase(Arathy)). I want to replace this if-else loop with Switch cases..What way i can do to accomplish this?

Member Avatar for ~s.o.s~
0
159
Member Avatar for dennysimon

hello all what is the meaning of : "Value@a90653" I just try to print a variable but the result is "Value@a90653" thank you denny

Member Avatar for dennysimon
0
140
Member Avatar for tabish saroha

Dear All, I am writing the following code but I am facing some problem. public void actionPerformed(ActionEvent ae) { if (ae.getSource()==connect) { JOptionPane.showMessageDialog(null, "Connection Estabilished"); } else if (ae.getSource()==disconnect) { JOptionPane.showMessageDialog(null, "Connection Disconnect"); } } When I Write this code, compiler compile this code but does not show messagebox when …

Member Avatar for NormR1
0
128

The End.