2,777 Posted Topics

Member Avatar for akingcool

[QUOTE] How do I go about displaying all the lines from the file in one output box?[/QUOTE] Concatenate the lines together separated by new line characters (\n)

Member Avatar for mKorbel
0
3K
Member Avatar for lethal.b
Member Avatar for sunmania

If the data is in a file, you can use the Scanner class to read the contents of the file into Strings using one of its next....() methods.

Member Avatar for dmanw100
0
2K
Member Avatar for scheppy

[QUOTE]the circlearea Jlabel wont update.[/QUOTE] The only variable I find with that name is: [CODE] static double circlearea;[/CODE] Can you say what JLabel you are talking about? [QUOTE] I get an error[/QUOTE] Please post the full text of the error message.

Member Avatar for scheppy
0
250
Member Avatar for chandrasekar21

Have you tried using Search on this forum (or with Google) to find code samples.

Member Avatar for NormR1
0
58
Member Avatar for Dmiller071
Member Avatar for NormR1
0
315
Member Avatar for pri20

Java is does not know much about the internals of most OSs. You will need another tool that can talk to Windows' internals.

Member Avatar for NormR1
0
154
Member Avatar for Dmiller071

Can you put the image into the jar file and save loading it from the server? Look at using ImageIO and the Class class's getResource() method [QUOTE]a way to only paint that object in the location you want it[/QUOTE] Not sure what you are asking here. By object do you …

Member Avatar for NormR1
0
219
Member Avatar for R32@

To save for a long time probably means you have to write the data to a disk file or a database. See this site for some info: [url]http://docs.oracle.com/javase/tutorial/essential/io/index.html[/url]

Member Avatar for R32@
0
3K
Member Avatar for chixm8_49
Member Avatar for vaironl

[QUOTE]The problem is that after a certain amount of characters, everything is being writting to the next line[/QUOTE] How do you define a line. Normal definition is a line contains all the characters up to the line end character ('\n'). A very large file can contain no line end chars …

Member Avatar for JamesCherrill
0
709
Member Avatar for peter20

It looks like you're mixing enum and generics: "has three states" Can you explain what you are trying to do?

Member Avatar for peter20
0
181
Member Avatar for rahul_galgali

[QUOTE]which inteface should I use to import the image from the file[/QUOTE] The ImageIO class has methods for reading images from a disk file. [QUOTE]show the image in the dailog[/QUOTE] You could make the image an icon in a JLabel. The ImageIcon class also has ways to get its image …

Member Avatar for NormR1
0
110
Member Avatar for Feriscool

[QUOTE]edit the same files at the same time without conflict[/QUOTE] That sounds like VERY sophisticated software.

Member Avatar for JamesCherrill
0
88
Member Avatar for moonL!ght

Can you explain your problem? If the shapesList array has all the shapes you want to draw, could the paint method loop through the array and draw the shapes saved there?

Member Avatar for moonL!ght
0
397
Member Avatar for kyriacos1986

[QUOTE]I have some problems to complete this task.[/QUOTE] Please post your questions and problems.

Member Avatar for NormR1
0
6K
Member Avatar for Dmiller071

[QUOTE]In my JApplet, my actionPerformed method should open a website [/QUOTE] Have you looked at the showDocument method? applets are restricted in what they can do. [url]http://docs.oracle.com/javase/tutorial/deployment/applet/security.html[/url]

Member Avatar for Dmiller071
0
190
Member Avatar for jhellr13

[QUOTE]what I need help with. Writing the method calcStDev. [/QUOTE] Do you have the formula for calculating the std dev given a list of numbers? You will need that before you can write any code.

Member Avatar for NormR1
0
366
Member Avatar for Isaac93

Cross posted at [url]http://www.java-forums.org/new-java/53203-cipher-system.html[/url]

Member Avatar for NormR1
0
95
Member Avatar for programing

[QUOTE]its give me wrong output[/QUOTE] Can you post the output and add some comments to the output saying what is wrong with the output and show what the output should be? The more you explain, the better we will be able to help.

Member Avatar for NormR1
0
178
Member Avatar for jhellr13

[QUOTE]ve gotten this to work with a for loop without a sentinel value[/QUOTE] How did you stop the loop? What do you understand a sentinel value to mean? If you can write a loop to get input from a user, what ways do you have to have the user tell …

Member Avatar for NormR1
0
1K
Member Avatar for Skretch

[QUOTE]it wont work.[/QUOTE] Please explain. Do you get errors? Please post the full text of the error message. Do the listener methods get called? Does the component with the listeners have the focus? Can the component with the listeners receive the focus? Not all components do this automatically, you need …

Member Avatar for Skretch
0
350
Member Avatar for dennysimon

The trick with making a batch file to execute a single java class file is to use the right variable name in the batch file that picks up only the file name. I think it is something like: %~n1 This would allow you to set the RightClick context menu to …

Member Avatar for NormR1
0
202
Member Avatar for mynamewontfitin
Member Avatar for nHulk

Where is the class: AOperation defined? Is its location on the classpath for the javac command?

Member Avatar for nHulk
0
202
Member Avatar for madhub2v

[QUOTE]what is the use of "move" method here?[/QUOTE] Here you need to use the API doc. It will explain to you what the move method does. Find the object class that move is a method for and go to that class's API doc.

Member Avatar for Ezzaral
0
2K
Member Avatar for creative_m
Member Avatar for rahul_galgali

You use classes to build a java application. The window would be a JFrame. The rest is up to your design. You should take the time to read the Java tutorials and learn something about java before trying to write an app. Some links: [url]http://download.oracle.com/docs/cd/E17409_01/javase/tutorial/[/url] [url]http://download.oracle.com/javase/tutorial/reallybigindex.html[/url]

Member Avatar for rahul_galgali
0
181
Member Avatar for memo1
Member Avatar for NormR1
0
57
Member Avatar for keval_hack
Member Avatar for programing

Do you have an algorithm you are trying to use? Can you write a list of pseudo code statements to describe it?

Member Avatar for stultuske
0
639
Member Avatar for gourav1

In case you are having trouble with google: [url]http://docs.oracle.com/javase/tutorial/uiswing/events/index.html[/url]

Member Avatar for NormR1
0
139
Member Avatar for programing

[QUOTE] the lest for statement its not print array in reverse order [/QUOTE] Please post the program's output that shows the problem. You need to edit your code and properly align the statements. The messy way you have posted the code makes it very hard to read. You should align …

Member Avatar for NormR1
0
247
Member Avatar for programing

Please explain what your problem is? [QUOTE] check if a given number is plindrom or not [/QUOTE] What is the code supposed to be doing with all the numbers it reads in?

Member Avatar for .:n'tQ-boy:.
0
202
Member Avatar for rssk

So you can show us what is happening (on Windows) 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 'Copy' Paste here.

Member Avatar for peter_budo
0
553
Member Avatar for SubzeroX6

Can you make a small simple program (SSCCE) that shows your problem? You've posted too much code for most people to want to work with.

Member Avatar for NormR1
0
330
Member Avatar for jackmaverick1

Please post any code you have that you want us to look at here on the forum.

Member Avatar for JamesCherrill
0
125
Member Avatar for JavaPrograms

Do you have an algorithm that describes your logic in finding the two largest elements? A list of the steps you think will solve the problem.

Member Avatar for rickypounting
0
2K
Member Avatar for bibiki

Please make a small simple complete program (SSCCE) that shows your problem and post it here.

Member Avatar for bibiki
0
123
Member Avatar for 03hasnam

If you want your code to wait for user response, try using a modal dialog instead of a JFrame for the Login class.

Member Avatar for NormR1
0
147
Member Avatar for serdas

It's possible on Windows to have several different versions of java available. One is the default, the others I get to by using full paths to the javac.exe or java.exe commands.

Member Avatar for serdas
0
371
Member Avatar for 03hasnam

It is possible to add the same action listener as a listener for more than one button. Create an inner class that implements the ActionListener interface, create an instance of it and add it as listener to the buttons.

Member Avatar for 03hasnam
0
3K
Member Avatar for 65piano

[QUOTE]identify which button in the array[/QUOTE] In the listener you can call the Event class's getSource method to get a reference to the component causing the event. To save information about a component/button (like where you put it in an array) you could use the JComponent's ClientProperties which is like …

Member Avatar for JamesCherrill
0
201
Member Avatar for libathos

Is this a java syntax problem or does it have to do with the way the package you are using works? You can create an array anywhere in your code and then pass a reference to that array to a method as its argument. You do not need to create …

Member Avatar for libathos
0
198
Member Avatar for dennysimon
Member Avatar for dennysimon
0
584
Member Avatar for 03hasnam
Member Avatar for NormR1
0
146
Member Avatar for moonL!ght

What variable has a null value? Where does that variable get assigned a value? Add a println next to where the variable gets a value to see if that code is being executed. If there is no print out, then the code is not executed and p will not get …

Member Avatar for stultuske
0
209
Member Avatar for ziadkassam
Member Avatar for Jenna1994
Member Avatar for Swirly

[QUOTE]java.lang.NullPointerException at java.applet.Applet.getDocumentBase(Applet.java:141) at Deck.<init>(Deck.java:38) //line 6 first block [/QUOTE] What is the statement at line 38 doing? If your code is not an applet running in a browser, there is no AppletContext object that can be called to get the document base.

Member Avatar for NormR1
0
212

The End.