2,777 Posted Topics

Member Avatar for aanders5

Are you executing the applet in a browser? Are there any error messages in the browser's java console?

Member Avatar for NormR1
0
568
Member Avatar for manishanibhwani

You should put all the files needed for your applet into a jar file and use the class loader's getResource method to get to the file so it can bee read. Do a Search here for getResource for example code.

Member Avatar for manishanibhwani
0
156
Member Avatar for sadzee
Member Avatar for NormR1
0
109
Member Avatar for Ordella

Assign r a value and make the compiler happy. The compiler wants you to assign initial values to local variables (inside methods)

Member Avatar for Ordella
0
105
Member Avatar for NormR1

How you you make a comment using the new forum? Half the time my text following the comment is included in the shading for the comment. The mechanism for adding a comment seems awkward. On many other forums you could click a button, paste the comment and click the button …

Member Avatar for Ancient Dragon
0
186
Member Avatar for Ashenvale

Is the path shown in the error message correct? Is that where the JDK is installed?

Member Avatar for Ashenvale
0
194
Member Avatar for winecoding
Member Avatar for Srin

[QUOTE]how can I make the label movable after it's been created[/QUOTE] The mouse motion listener will help you with that. It takes some playing with to get it to move smoothly but its possible.

Member Avatar for NormR1
0
549
Member Avatar for mehnihma

> write the frist line but how to write the whole string? What do you mean by a line and a String? Can you define what the difference is between those two terms? What do you use to view the contents of the output file?

Member Avatar for mehnihma
0
118
Member Avatar for mehnihma

What do you mean by: > Quoted Text Here write it to binary Can you give an example?

Member Avatar for mehnihma
0
2K
Member Avatar for willywhomperz
Member Avatar for Bowsan22

Define an int as a counter, then add one to a counter every time a new number is entered. Look at about line 16 to do this

Member Avatar for Xinen
0
329
Member Avatar for prog.java
Member Avatar for wickedlullaby92

Can you reference the lines of code where you are having problems with the logic? Where in the 195 lines of code it the problem?

Member Avatar for NormR1
0
236
Member Avatar for Valiantangel

> Why am i getting error Please copy and paste the full text of the error message.

Member Avatar for Valiantangel
0
70
Member Avatar for marines10
Member Avatar for marines10
0
440
Member Avatar for sp85202

One potential problem with the way this is coded is that you have not used {}s for the statements in the if and else parts. This can often cause problems that are hard to see.

Member Avatar for TrustyTony
0
5K
Member Avatar for shean1488
Member Avatar for shean1488
0
99
Member Avatar for vinnitro

Can you show the debug print out when the problem happens? Add enough more println statements to show the values of all the variables as they are used.

Member Avatar for vinnitro
0
177
Member Avatar for Valiantangel

Have a look: [Link Anchor Text](http://docs.oracle.com/javase/tutorial/java/concepts/class.html

Member Avatar for NormR1
0
111
Member Avatar for skoon

Start by writing a program that just creates one square. Then look at how you can change it to make the next square.

Member Avatar for NormR1
0
148
Member Avatar for mydreamgirl

I don't see any static classes here, Do you mean static variables? Why are you using static variables? > I was expecting to see different values You only get different values (one per class instance) with non static variables. With static variables all instances of a class share one variable.

Member Avatar for NormR1
0
182
Member Avatar for gatorsgirl

Can you post the output that shows the problem and add some comments to it that explains what is wrong with it and that shows what the output should be?

Member Avatar for NormR1
0
222
Member Avatar for skiabox

Is the JPanel added after the GUI is made visible? Try calling setVisible after adding the JPanel.

Member Avatar for NormR1
0
173
Member Avatar for DavidKroukamp

Try debugging your code by adding println() statements to show execution progress and how variable values are changing. For example: Add a: System.out.println("var=" + var); after every line where a variable is changed by an assignment statement or read into. The printout should show you in what order the methods …

Member Avatar for JamesCherrill
1
247
Member Avatar for nyfan68

If you use the read() method, you can test every byte that is read to see if its one that you want to print. Please wrap your code in code tags. Use the `[code]` icon above the input box.

Member Avatar for nyfan68
0
210
Member Avatar for slman
Member Avatar for stultuske
0
102
Member Avatar for sugir1987

What does the text file contain? If it has a record with two Strings that are the row and column values, you could use the Scanner class to read and convert those two Strings into int values. If you read the whole line as a String then you will need …

Member Avatar for NormR1
0
172
Member Avatar for jade_91

[QUOTE] its coming up with errors[/QUOTE] Please copy and paste here the full text of the error messages.

Member Avatar for NormR1
0
262
Member Avatar for ganesanronaldo

What kind of protocol do you have? Does the client connect to the server and request a file or does the server choose what file(s) it is going to send? If the server is going to send more than one file, does it tell the client how many files it …

Member Avatar for ganesanronaldo
0
248
Member Avatar for rob211
Member Avatar for rob211

Use a for loop to look at the numbers one at a time and save the largest ones. If you are saving the indexes and there can be more than one, you will need another array to save the indexes in.

Member Avatar for rob211
0
181
Member Avatar for coroll
Member Avatar for mags11

The "cannot find symbol" message is telling you that the compiler can not find a definition for the symbol named in the error message that is defined in scope where the symbol is being referenced. For each one you need to see why you are using a symbol that is …

Member Avatar for NormR1
0
3K
Member Avatar for shean1488
Member Avatar for 117
0
203
Member Avatar for needjavahelp

Override the JPanel class's paintComponent method and do the drawing there. You can make the drawing conditional on values set by other methods the the program,

Member Avatar for zeroliken
0
470
Member Avatar for Valiantangel

Can you post the code that is generating a random number with the value of 0

Member Avatar for NormR1
0
257
Member Avatar for shean1488

What line is the NPE on? What variable has a null value? Add a call to the printStackTrace method to get the full text of the error message.

Member Avatar for NormR1
0
159
Member Avatar for Sgt. Pepper

[QUOTE]My current shape selection disappears[/QUOTE] How would clearRect change a selection? You have not posted enough code to tell what the program is doing.

Member Avatar for NormR1
0
10K
Member Avatar for jade_91

The code that reads the file needs to save the Strings it reads in an array or arrayList so that they can be sorted after they are all read in. The problem with an array is that it must be defined large enough to hold all the Strings you want …

Member Avatar for NormR1
0
507
Member Avatar for Traps

How are you going to use a java program for this project? There are many algorithms for hashing a String. Have you researched one that looks good for you? By hashCode are you referring to what is returned by the Object class's hashCode() method?

Member Avatar for Traps
0
105
Member Avatar for ringo_tech

If you know the client that sent the message and have a reference to it, then use that reference as you send the messages to the clients in the list to skip over the client that sent the message. I assume that you have a list of connected clients and …

Member Avatar for NormR1
0
163
Member Avatar for mayursharma

What is a "linked file"? What is the format of the bytes in the file? If you can get the path to the file, you can read its contents in a java program. But you will need to know the format of the bytes in the file to extract any …

Member Avatar for mayursharma
0
752
Member Avatar for ladybro

2D arrays are really an array of arrays. If you think of a 2D array in row and column terms, each row can have a different number of columns, including 0. For example:[CODE] int[][] twoD = new int[5][]; // Define 2D array with 5 rows, leave # columns undefined twoD[0] …

Member Avatar for NormR1
0
188
Member Avatar for jcAmats

If you don't want repeats, then you will need to keep track of what has been read so far, and skip reading that one again. If the number of records are known, you could use a boolean array to keep track of what has been read.

Member Avatar for jcAmats
0
594
Member Avatar for poojavb

You could create a batch file that executes the jar with a DOS window. Leave the window open when the java program finishes: use MORE. The contents of the DOS window could be copied and saved. To copy the contents of the command prompt window: Click on Icon in upper …

Member Avatar for poojavb
0
147
Member Avatar for Valiantangel
Member Avatar for jingham

Where will these pairs of numbers come from? A file or via user input? If the numbers don't change often, then you could read them from a file that a user could fill in using an editor. If there are two numbers that go together, you could create a simple …

Member Avatar for NormR1
0
251
Member Avatar for matthew.m

Please explain what your problem is. Please edit your post and wrap the code in code tags. Use the [CODE] icon above the input box.

Member Avatar for NormR1
0
569
Member Avatar for drogba123

Please post the full contents of the window showing all of the error message text. To copy the contents of the command prompt window: Click on Icon in upper left corner Select Edit Select 'Select All' - The selection will show Click in upper left again Select Edit and click …

Member Avatar for NormR1
0
179

The End.