32,199 Topics
| |
Hallo - trying to set up Frost ptp software but Frost Bat can't access Frost Jar. This program came as a complete package and should not require any 'off piste' tinkering. Something simple must be wrong. Any ideas please ? | |
Hey lads, I have a small problem re inheritance. The 1st piece of code is the superclass which contains hour and minute. The 2nd piece of code which is the subclass, contains the int second. The 2nd piece inherits the code from the 1st piece. Now when seconds go over … | |
I have two problems with my code. One being I can't get it to repeat the simple game until the user has no money in his or her bankroll, the game continues even when the bankroll equals 0. The other is I can't get my program to repeat asking the … | |
hi! i developing chat application ... my client and server communicate at lan but over internet it is not... i came to know that port forwarding for client and server communicate behind router... but Skype is working without any port forwarding.. how can achieve my chat application working like skype … | |
[CODE] else if (e.getSource() ==butRetrieve) for (int i=0;i<Store.count;i++) { [COLOR="Red"] u=new Employee(myStore.elementAt(i));[/COLOR] if(txtName.getText().equals(u.name)) { u=(Employee)myStore.elementAt(0); txtName.setText(u.name); txtPhonenum.setText(u.phoneNo); txtNi.setText(u.natInsceNo); } }[/CODE] Code in red is the problem, "cannot find symbol - constructor Employee(person)". Im a java virgin so please be gentle. | |
i need a simple way to slow down a for loop using a simple timer-like method. i know for a fact that there is one, because i used it in high school, i just can't remember the code. | |
hello guys, i have this code written down to print a magic square and i get an error. public void doMagic() { int k = 1; int row = 0; int col = order/2; msArray[row][col] = k; for ( int r = 0; r < msArray.length; r++) { for ( … | |
[code] import java.io.*; public class SortDoubleArray { public static void main(String[] args) throws IOException { double[] doubleValue = new double[10]; Input(doubleValue); ascendingSort(doubleValue, doubleValue.length); descendingSort(doubleValue, doubleValue.length); } public static void Input(double[] array) throws IOException { BufferedReader dataIn = new BufferedReader (new InputStreamReader(System.in)); String[] numbers = {"first", "second", "third", "fourth", "fifth", "sixth", … | |
So I have all these methods that I need to run for multiple files through command line arguments. How to I get it to allow more than one file? I know how to get it to work with one file by just using String first = args[0]; The code I … | |
Please can anyone tell me if its possible to save chat between a server and client using java windows to a file. A link to a site where I can find the information will be sufficient. Thanks | |
Hi, I need to develop a functionality similar with the iTunes one, when you right-click a song -> Get Artwork, the jpg/png is "embeded" into the mp3 file. I have no ideea how this could be done, do you have any hints ? Thanks. | |
Alright. So this is just one part of my multiple part project. I need to try and get the frequency of how many times each word of 'X' amount of letters shows up. I am pretty bad at using arrays, but I realize this is the best way to do … | |
I'm relatively new to Java and I'm writing a code that implements a simple "Hi-Lo" game using a standard deck of 52 playing cards. I could give you the entire description of the program's requirements, but I won't let you all suffer the same headache I do. :P Anyhow, here's … | |
Can someone please help me? I'm getting an exception: Given final block not properly padded. I can't figure out what I'm doing wrong. Shouldn't Java automatically pad the data for me? [CODE] import java.security.*; import java.io.*; import javax.crypto.*; public class AES { static String fileName = "javaEncrypted.dat"; static File inputFile … | |
Hi all, i am not an experienced Java GUI programmer and its the first time i'm asking for help in programming on a forum. I have this simple GUI which allows people to mark text with different categories. I use JTextPane and DefaultStyledDocument. Basically, i took most of the code … | |
How do I make system calls in Java? I could do it in C but I'm not sure how to do it in Java. Thanks!! | |
Hi, I have really weird layout problem. I have a class VerticalGridPanel, which uses GridBagLayout to place components top to bottom, left to right, nothing special. Then I have a List of components, which i want to add a part of to a VerticalGridPanel. I then want to add another … | |
I habitually compile after every change I make, i had all of 5 minutes to start a project and this will not compile!!: [CODE] public class Battleship{ public static void main(String[] args){ int boardInput = parseInt(args[0]); } }[/CODE] I get this error: Battleship.java:19: cannot find symbol symbol : method parseInt(java.lang.String) … | |
This program I thought was working fine. It reads something I type in then it's supposed to break up the words (or random letters) separated by a " " and pop them into array [B]arr[/B]. It works, well sometimes... I don't know what's stopping it and them other times allowing … | |
hi i have used three classes to make link list in java lean list as interface, Basic list got the constructor etc , and Demo basic test i need the function to be added in the demo basic list to complete the program. the following code for classes are as … | |
i am using a GridBagLayout and it works fine when i take my coordinates to place an asterisk on the frame but if i try to extract the coordinates from an sql table then it just displays one single asterisk and which would be in the center.. and if i … | |
I have to create a currency converter for a project and i need help, I have to build it from using my commissionapplet with the directions from the work sheet some one please help | |
Hey guys. Can anybody tell me what is wrong with this line of SQL? I keep getting a syntax error message. Here is the line: [CODE]prepStat = connection.prepareStatement("INSERT INTO WeatherHistory (Date, Location, Overview, Temperature, WindDirection, WindSpeed, Pressure) VALUES ('"+date+"','"+location+"','"+temp+"','"+windDir+"','"+windSpd+"','"+pressure+"')");[/CODE] All the field names and variables exist correctly, so I really … | |
Here I have a program called Connect4Model. Basically what the problem is that I have successfully compiled the program in TextPad. However when I run the program it throws up an Exception in thread "main" error. I fully understand what this error is, and it basically means that I'm missing … | |
Hi i've got a JPanel which contains a JButton. Now, i'm able to drag this JButton anywhere inside the panel fine. Normally, if i were to just click on this button, a new jframe would appear which contains a jtextarea. My question is, that, everytime I click on the Jbutton … | |
[CODE]import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.io.*; import java.sql.*; class transfer extends JFrame implements ActionListener { JButton btntrans,btndel,btnexit,btnclear,btnone; ImageIcon bc; JLabel lbltitle ,label1; JTextField text1; JScrollPane scrollPane ; Thread t; DefaultListModel listModel; public transfer() { setSize(550,400); setTitle(" FILE TRANSFER "); Container cp=getContentPane(); lbltitle= new JLabel(bc); label1 = new JLabel(); … | |
public class Connect4Model { Connect4Column [] columns; // Cannot find symbol private int NUM_COLUMNS; private int NUM_ROWS; private int playerToGoNext = Connect4Column.RED_COUNTER; // cannot find symbol Connect4Model(int numCols, int numRows); // Missing method body...Is this because I'm missing a curly braces just above { columns = new Connect4Column[NUM_COLUMNS]; for (int … | |
To be honest...I am horrible at java. I just got a job and have missed class a few times because of it and im supposed to create a project that can read the number of lines, words, characters, average words length, and letters in a file. I am trying to … | |
Hello, Can anyone tell me how to get records from SQL server database in j2me. As I want my application to run on Low-configuration device, I cant use servlets. Also help me on writing and reading objects in a file using j2me? Thank you! | |
Hi i was wondering if it was possible, in java, to save a session/state of an application and then reloading the data (all automatically)when re-opening?? I have a GUI with some textarea, a jtree with filesystem hierarchy and a jpanel with buttons. I can create many buttons and within these … |
The End.