2,777 Posted Topics

Member Avatar for chinee
Re: GUI

[CODE] //c.add(mobileOrdersInputLabel); //c.add(floralOrdersInputLabel); [/CODE] What happens when you uncomment these? You need to look into how to use layout managers.

Member Avatar for NormR1
0
90
Member Avatar for mbaker3

If[B] parsing[/B] the text file each time is a problem, then can you create your own formatted file that does NOT require parsing but can be read and used to create the objects needed. What are you trying to optimize?

Member Avatar for NormR1
0
84
Member Avatar for Member 785174

The trick is to initialize the variables that are to receive the lowest number with the highest possible number ie any number will be smaller than its first value. For the highest value initialize the save variable with the lowest possible number so that any number will be higher. Add …

Member Avatar for NormR1
0
138
Member Avatar for Member 785230

[QUOTE]a single digit from an int[/QUOTE] It depends on the number's base. You use the modulus and divide operators to get at the "digits" of the int number. For base 10 use % 10 and / 10 Remember all data is stored in the computer in binary. We humans like …

Member Avatar for Prateek Jauhari
0
93
Member Avatar for hasbeenbad
Member Avatar for NormR1
0
135
Member Avatar for hermann87
Member Avatar for NewOrder
Member Avatar for NormR1
0
132
Member Avatar for orcboyx

Why do you want to convert a boolean to an int. It makes no sense. A boolean has 2 values, an int has billions. Why would one of the billion values be true and another be false? 0 and NOT 0 are C concepts. Nothing in java corresponds.

Member Avatar for javaAddict
-1
885
Member Avatar for pinsickle

[QUOTE]what happens if[/QUOTE] Sounds like an easy program to write and test what happens. And probably faster than waiting for someone to come along. Could you write a program to test this and report back the results?

Member Avatar for pinsickle
0
126
Member Avatar for Brandon515

Sounds like a logic problem. Add some println() statements to show the values used to position the paddle every where they are used and where they are changed. Looking at the output should help you find your problem.

Member Avatar for NormR1
0
108
Member Avatar for The king
Member Avatar for NormR1
0
66
Member Avatar for Member 784795
Member Avatar for asad_80

Can you post the console output for when you execute the code that shows the printouts? [CODE]if(record2%2!=0)[/CODE] What is the purpose of that statement? There is a lot of undocumented/unexplained logic in the actionPerformed method. Can you explain what all that is about? There are many variables and tests that …

Member Avatar for NormR1
0
102
Member Avatar for yap_1991

[QUOTE]why is it that I dont get any output shown[/QUOTE] Can you show your output? [CODE] String a = new String("fileName"); if (a.matches("^[ATOM][.]$[^H]")) [/CODE] What do these two statements do?

Member Avatar for NormR1
0
643
Member Avatar for daudiam
Member Avatar for Hunter2379

Why start a new thread? [URL="http://www.daniweb.com/forums/post1267559.html#post1267559"]http://www.daniweb.com/forums/post1267559.html#post1267559[/URL]

Member Avatar for peter_budo
0
70
Member Avatar for abbyo

First read the API doc on applets and the Tutorial about Applets Start with a class that extends JApplet. Move the code in main() to an init() method.

Member Avatar for NormR1
0
218
Member Avatar for student.09

@moutanna How does uncommented code explain how to design and code a program to solve a problem?

Member Avatar for student.09
0
324
Member Avatar for bibiki

Try debugging the code by using println() to print out the value of the size variable when its changed and when its referenced.

Member Avatar for NormR1
0
138
Member Avatar for mikaelaillanes
Member Avatar for Cort3z

[QUOTE]Is it possible to return an array "directly",[/QUOTE] Have you tried it with the compiler? Do you get errors?

Member Avatar for Cort3z
0
110
Member Avatar for Member 784291
Member Avatar for pmedic

[QUOTE] it does not give me the right answer...[/QUOTE] Please Show the input and output and explain

Member Avatar for NormR1
0
89
Member Avatar for fullgl

I don't see any comments in the code showing where the sort is happening. Can you comment the code to show where the sort logic is?

Member Avatar for Cort3z
-1
192
Member Avatar for donhazem

You'll need to get a package for reading Excel files, unless its a .csv which is really text and can be read by java.

Member Avatar for NormR1
0
90
Member Avatar for Hunter2379

YOUR CODE DOES NOT COMPILE!!! Waste of time posting code with syntax errors!!! Have you tried debugging your code by add println() statements at different places to show when and where the code is executing and how variables values change? Also it'd be easier to test your code if you …

Member Avatar for NormR1
0
292
Member Avatar for ubi_ct83

A couple of suggestions: 1)Add a sample input to the code that allows for easy of testing: Add this first thing in main() method [code] if(args.length == 0) { args = new String[] {"-i", "3", "-t", "3", "-1", "3","-t", "3"}; } [/code] 2) add a final else clause to print …

Member Avatar for NormR1
0
233
Member Avatar for student.09
Member Avatar for NP-complete
0
117
Member Avatar for mundvawala

[QUOTE]System.out.println(jPieces[x][y])[/QUOTE] Try debugging your code by changing the above to: System.out.println("x=" + x + ", y=" + y + " " + jPieces[x][y]) That should show you the problem.

Member Avatar for Krefie
0
166
Member Avatar for Mathukutty

Is your OS multi tasking? Can the OS use time while your code is executing? [QUOTE]tm.getCurrentThreadUserTime()[/QUOTE] What class is the tm object?

Member Avatar for Mathukutty
0
223
Member Avatar for man.getName()
Member Avatar for man.getName()
0
197
Member Avatar for manish_gupta
Member Avatar for amit.hak50
Member Avatar for amit.hak50
0
275
Member Avatar for daudiam
Member Avatar for rkj2ban

[QUOTE]I NEED a similar program[/QUOTE] Do you mean: I NEED [I]to write[/I] a similar program? Otherwise have you tried Google?

Member Avatar for NormR1
0
67
Member Avatar for amit.hak50
Member Avatar for RicardoE

Could you have a Window listener that uses setLocation to move it back.

Member Avatar for amit.hak50
0
204
Member Avatar for onlyvidya
Member Avatar for onlyvidya
0
142
Member Avatar for 1314abc

[QUOTE]how to save it into .txt or .dat[/QUOTE] If you have 'it' in an editor like Notepad, you can use the File|Save menuitem to save it to a file. What is the 'it' you ask about? [QUOTE]how do i view it in another new frame that view the list in …

Member Avatar for 1314abc
0
161
Member Avatar for shishir
Member Avatar for jamojo

Can you look at what the server receives when you try to access it with that URL? What happens if you use that URL in a browser? I don't know if the URL class has the logic to do the steps needed to respond to a 401 response by generating …

Member Avatar for NormR1
0
105
Member Avatar for arete

[QUOTE] get the bidder's name called[/QUOTE] What variable is the bidder's name in? I don't see it in the code you posted. Is it in the Person object reference by bidder?

Member Avatar for arete
0
352
Member Avatar for smoothe19

The doc for compareTo() says: "Compares two strings lexicographically." Can you show an example where the results are not case sensitive?

Member Avatar for NormR1
0
321
Member Avatar for bibiki
Member Avatar for BWind
Member Avatar for nikelin

When I try to compile I get: Running: D:\Java\jdk1.6.0_02\bin\javac.exe -Xlint -g -deprecation -classpath D:\JavaDevelopment\;. PackageLoader.java PackageLoader.java:16: cannot find symbol symbol : class Logger location: class PackageLoader private static final Logger log = Logger.getLogger( PackageLoader.class ); ^ PackageLoader.java:22: cannot find symbol symbol : class Filter location: class PackageLoader public <T> Class<T>[] …

Member Avatar for NormR1
0
415
Member Avatar for sitajaf

[QUOTE]how to listen before any client connects [/QUOTE] Use the ServerSocket class.

Member Avatar for Stefano Mtangoo
0
180
Member Avatar for jt86442

[QUOTE]i need delete all the files dynamically[/QUOTE] Sounds like you need to get the names of all the files in the directory and delete them one by one. Read the comments in the above code.

Member Avatar for NormR1
0
92
Member Avatar for hermann87

[QUOTE]Does class B also implement interface B_int?[/QUOTE] What does the compiler say? Code a test and compile it and let us know the results.

Member Avatar for hermann87
0
90
Member Avatar for jemimaloh

Do you have the algorithm that you want to write in Java? Once you get that, someone can help you with your problems coding it.

Member Avatar for jemimaloh
0
116

The End.