32,199 Topics
| |
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 … | |
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; … | |
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 … | |
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 … | |
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 … | |
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 … | |
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.... … | |
[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 … | |
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. | |
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 … | |
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 … | |
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 … | |
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. … | |
| 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, … |
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. … | |
I'm just wondering whether using socket is the only way to build communication mechanism of a p2p system? Thank you in advance. | |
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 … | |
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 … | |
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 … | |
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. … | |
can we return 7 elements of an int array using return statement. if not, please help? | |
hello, can anyone tell me how to convert int array to string? | |
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! | |
*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 … | |
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 = … | |
*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 … | |
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 … | |
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? | |
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 | |
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 … |
The End.