7,116 Posted Topics

Member Avatar for Nooshin Z
Re: GUI

That's very vague/general/large question. How much do you know already, and where does your difficulty start? Are you familiar with the content in the first few sections of the Oracle tutorials, and the last two (event listeners, custom painting)? http://docs.oracle.com/javase/tutorial/uiswing/index.html

Member Avatar for JamesCherrill
0
134
Member Avatar for Gobumanikandan

You specify that class that has the main method in the Main-Class entry in your manifest file. The class name should be fully qualified with its containing package structure, and that must match the folder structure in your jar.

Member Avatar for JamesCherrill
0
283
Member Avatar for murali2489

I *think* that compiled stub stuff related to an earlier version of RMI (pre Java 1.5), but the current version works at run time via reflection and so doesn't need the old skeleton/stub files. That's one danger of using a book rather than current online sources. codebase is an HTML …

Member Avatar for murali2489
0
203
Member Avatar for viphilar

Just before starting the search, create a "global" int depth = 0; Increment it in the "down" method and decrement it in the "up" method.

Member Avatar for maxbummber
0
977
Member Avatar for andrewriebel

Why do you think that? Java char is a numeric 16 bit integer type, perfectly OK, and converted to int by Java whenever needed. Did you test that before posting? It may be an odd choice, but its not wrong. It certainly won't fix his (unspecified) problem, which is caused …

Member Avatar for JamesCherrill
0
154
Member Avatar for Zet_

Yes, that sounds very ambitious - unrealistic in fact. I don't want to sound discouraging, but maybe something more achievable would be a better choice.

Member Avatar for JamesCherrill
0
222
Member Avatar for seanbp

Kris. Content posted on Daniweb is subject to Daniweb's T&Cs, including DaniWeb LLC reserves full rights and privileges to information posted to anywhere within the daniweb.com domain by its members and staff. Any and all information posted on DaniWeb may not be copied or used elsewhere, in any way, shape, …

Member Avatar for JamesCherrill
0
1K
Member Avatar for andrewriebel

Java 7 allows switches using a String. If you're not on Java 7 then you should be.

Member Avatar for JamesCherrill
0
157
Member Avatar for ARC.1

You just copy/pasted your assignment without even a moment taken to explain what help you need. That's highly disrepestectful to the many people who give their time to help others here. There are lots of people here who will freely give their time to help you become the best Java …

Member Avatar for Seldar
0
145
Member Avatar for sweetdame22

You display the menu before entering the while loop,so it only gets displayed once. If you move it to be just inside the while loop it will be displayed every time you go round the loop.

Member Avatar for Seldar
0
209
Member Avatar for praom2104

In general a jar *will* run on any higher jre version. It's possible you may run foul of tighter security settings, as there have been a number of changes there since 1.5. How exectly does it "fail"? - absolutely nothing happens - runs but wrong results etc? Did you try …

Member Avatar for praom2104
0
279
Member Avatar for Violet_82

It's not clear what it is you don't understand... I suspect you already know the answer but are looking for a problem that isn't really there? Maybe this will help?... When you set up a new ATM it will need a Screen abd a Keypad, eg public ATM() { // …

Member Avatar for Violet_82
0
167
Member Avatar for rithish

You can use System.setOut(PrintStream out) to redirect all System.out.print data to the stream of your choice. If you use a ByteArrayOutputStream then you will get all the output in a byte array that can easily be converted to a String. Is that what you meant?

Member Avatar for stultuske
0
179
Member Avatar for anestistsoukalis

There's no harm in not closing a Scanner on System.in The console is just a transient thing, unlike (say) a buffered disk file, so you aren't worried about losing any data when the application terminates.

Member Avatar for JamesCherrill
0
167
Member Avatar for murali2489

The name being bound is normally just an ordinary string, maybe starting with a package name just to keep it unique. The doc says it's not parsed, but it looks like the // at the front is causing someone to try to parse & interpret it. This is just a …

Member Avatar for JamesCherrill
0
408
Member Avatar for chdboy

You are drawing them all at the same position 250,200 You need to increment that position's x or y value after each print so the next string goes to a different position

Member Avatar for chdboy
0
199
Member Avatar for smith ww

There are lots of people here who will freely give their time to help you become the best Java programmer you can be. There's nobody here who is interested in helping you cheat or doing your homework for you. DaniWeb Member Rules (which you agreed to when you signed up) …

Member Avatar for JamesCherrill
0
142
Member Avatar for feafnae
Member Avatar for JamesCherrill
0
179
Member Avatar for flpips

To protect from scummy criminals, the security settings for running applets have been steadily increasing over a number of Java updates. The main thing is to sign your applet jars using a proper certificate from a trusted authority. Depending on the user's java security settings (in the Java control panel) …

Member Avatar for JamesCherrill
0
90
Member Avatar for chdboy

It doesn't print because it doesn't run because it doesn't compile! Read all the compiler error messages, fix all the compile errors, and maybe you will get a bit further.

Member Avatar for JamesCherrill
0
305
Member Avatar for javaprog200

You overide paint for the whole applet, but in it you only paint the image. That leaves the rest of the applet unpainted. You could try a super.paint(g); as the first line of your paint, so the rest of the applet gets drawn properly befroe you draw the image. A …

Member Avatar for JamesCherrill
0
283
Member Avatar for Chris_16

That's lot of code to search for unspecified errors. "barely work" and "just give errors" tells us nothing. Please tell us EXACTLY what the problems are - complete copies of error messages, detailed what-it-should-do vs what-it-did-do etc.

Member Avatar for Chris_16
0
324
Member Avatar for woomar

Line 12 only returns 0 if the head node is null, ie the list is empty. That looks OK to me. In fact I agree with JeffGrigg (above) 100%

Member Avatar for JamesCherrill
0
265
Member Avatar for Benjamin_4

You have to execute a SELECT statement via Java's JDBC SQL support, then you get a ResultSet that contains the data in Java variables. Just Google for *JDBC tutorials*

Member Avatar for Benjamin_4
0
162
Member Avatar for mgold

Recent Java versions have direct support for embedded scripting languages, including sharing data etc. Here's a tiny eg I had lying about. // evaluate arbitrary jscript boolean expression... ScriptEngine js = new ScriptEngineManager().getEngineByName("JavaScript"); try { String condition = "a==b"; // expression to evaluate js.put("a", 2); // value for a js.put("b", …

Member Avatar for JamesCherrill
0
378
Member Avatar for woomar

You have 99% of the code right there. There's one bug that jumps out at me... the new node that you add should contain the "element" object.

Member Avatar for JamesCherrill
0
165
Member Avatar for solomon_13000
Member Avatar for JamesCherrill
0
153
Member Avatar for pspwxp fan

That should be 4) Create new object "changed", and set s2 to point to that object now s1 -> "82938", but s2 -> "changed"

Member Avatar for JamesCherrill
0
129
Member Avatar for MrHardRock

mohammedfae: DaniWeb Member Rules (which you agreed to when you signed up) include: "Do not hijack old threads by posting a new question as a reply to an old one" http://www.daniweb.com/community/rules As for your question - just look at the API documentation for the System class. The description of its …

Member Avatar for stultuske
0
904
Member Avatar for lizzy2

I think your original if test was correct. The problem is the semicolon at the end of line 8, which terminates the while block right there, so the message dialog is not part of the while, and always gets executed. Just get rid of that ;

Member Avatar for lizzy2
0
1K
Member Avatar for parul.arora.92505
Member Avatar for mohammedfae

I googled `java rsa encrypt large file` and this was the second hit... [Encrypting and decrypting large data using Java and RSA](http://coding.westreicher.org/?p=23) ps: Did you see the warnings about how unsuitable RDA is for large files? Depending on how big your files are you could easily get into minutes or …

Member Avatar for mohammedfae
0
3K
Member Avatar for eijnar
Member Avatar for IIM
0
222
Member Avatar for Edward_2

You just copy/pasted your assignment without even a moment taken to explain what help you need. That's highly disrepestectful to the many people who give their time to help others here. There are lots of people here who will freely give their time to help you become the best Java …

Member Avatar for JamesCherrill
-2
463
Member Avatar for zunairah

Now put lots of print statements into your code so you can see exactkly what is and what is not happening - eg is the client conecting? - does the server receive the message? ... etc etc

Member Avatar for JamesCherrill
0
209
Member Avatar for JamieVern

DaniWeb Member Rules (which you agreed to when you signed up) include: "Do provide evidence of having done some work yourself if posting questions from school or work assignments" http://www.daniweb.com/community/rules Post what you have done so far and someone will help you from there.

Member Avatar for Schol-R-LEA
0
210
Member Avatar for mikewyatt

Finding files froma Java program is always a difficult area, especially when moving from an IDE to a runtime environment. There's always confusion and doubt about where the files should be. The getResource is a good approach. If you change your path to "/Images/dragons.jpg" and place the Images directory in …

Member Avatar for JamesCherrill
0
154
Member Avatar for Benjamin_4
Member Avatar for Ann aiko

It all comes down to using the most appropriate layout manager. See http://docs.oracle.com/javase/tutorial/uiswing/layout/visual.html

Member Avatar for Ann aiko
0
176
Member Avatar for nikolaos

Lines 52-54 you have a synch block in which you wait on the lock object. But no other thread can get the lock to execute their notify, so the app hangs. Just synching on the same lock object will prevent simultaneous access from different threads. YOu only need to get …

Member Avatar for nikolaos
0
344
Member Avatar for Ann aiko

It's just like the Quit button you already have, but in the ActionListener instead of the `run()` method just being `system.exit();` itshould have the necessary code to set the text of the field you want to update.

Member Avatar for mKorbel
0
213
Member Avatar for bo_bon91

There's no "link" needed - it doesn't even make sense to "link" them. The first is a *template* - it's an example that shows you the "standard" code and where to add your own code. The second is an example of using that template - it has the same standard …

Member Avatar for JamesCherrill
1
261
Member Avatar for bkhp

JOptionPane.showInputDialog(null,"Enter Temperature: "); temp = input.nextInt(); You display the input dialog, but you do nothing with the result that it returns you. You then go back to the console to read an int. So the user enters something in the dialog, you ignore that, then he has to enter it …

Member Avatar for JamesCherrill
0
657
Member Avatar for Michal_2

You can use String methods: indexOf(' ') to find the position of the first space (end of first word), and lastIndexOf(' ') to find the position of the last space (start of last word), then use use substring to get the text between those two positions.

Member Avatar for Seldar
0
123
Member Avatar for Akeem Amure

1. Akeem Amure write this five years ago, he/she probably isn't here any more 2. You can use Google to find out how to run an applet 3. This is not a free coding service. Nobody will "rewrite the whole code" for you, and you are insulting us by asking …

Member Avatar for JamesCherrill
-1
1K
Member Avatar for mcoliver88

Declare a 30x5 array (an array of 30 elements, each of which is a 5 element array of ints). use your Day variable (line 14) to index the outer array, and hard-code the inner array refs, eg myDataArray[Day][0] instaed of the first "i" on line 16

Member Avatar for mcoliver88
0
211
Member Avatar for aqkill3r
Member Avatar for JamesCherrill
0
96
Member Avatar for xTurK

> I do not know how to make it so that, when you guess a correct letter, it reveals that letter in the hidden word while still keeping the other parts of the word hidden. You can use a StringBuilder - it's like a String but you can update individual …

Member Avatar for xTurK
0
323
Member Avatar for Ms

What exactly do you need help with? "I need help" tells us *nothing*.

Member Avatar for Schol-R-LEA
0
273
Member Avatar for laolumichael

Unwrap your loop, ie SELECT * FROM myTable WHERE columnId < 45... result of current row goes to row1.txt; rs.next(); result of current row goes to row2.txt; rs.next(); result of current row goes to row3.txt; rs.next(); result of current row goes to row4.txt; (or maybe it would be better to …

Member Avatar for laolumichael
0
223

The End.