4,084 Posted Topics

Member Avatar for poojavb

why did you create an exe file in the first place? do you have issues with non-Windows OS? :)

Member Avatar for poojavb
0
147
Member Avatar for bo0ga

looking at the sticky thread on top of the java forum could help you out. it's purpose is to show what books/ ... can help you start with (learning) java.

Member Avatar for stultuske
0
206
Member Avatar for Raj1987

inner classes ... network communication ... passing references of the frames to each other ... keeping references to all frames in the parent class, and allow those to be accessed by every client ... tons of ways you can do this, depending on what you have to keep in mind: …

Member Avatar for Robart Gilbert
0
79
Member Avatar for yozline

well you'll have to take into account all possible costs: if those pc's fail, do you have to go there for support? if that client is two doors down the road, no problem, but if that client is half way 'cross the country, that might cost you a bit. are …

Member Avatar for yozline
0
190
Member Avatar for jsp_novice

and what problem are you having? since we don't know what you are passing to this jsp page, how do you want us to check if it works or not?

Member Avatar for jsp_novice
0
136
Member Avatar for picogenkaku
Member Avatar for mags11

well, you still are passing 0 as a parameter, since that constructor shouldn't take a speed parameter, that's wrong. how did you change your car code, how did you change your main method and what is the exact error message you get?

Member Avatar for stultuske
0
12K
Member Avatar for MrHardRock

move your [Code=Java] int count = 0; [/Code] to right before the move method. you are resetting the value each time you call that method, that's your problem.

Member Avatar for MrHardRock
0
2K
Member Avatar for summey

[QUOTE=NormR1;1779850]You can initialize an array in one statement: int[] term = new int[]{7, 15, 30};[/QUOTE] or shorter: [Code=Java] int[] term = {7,15,30}; [/Code]

Member Avatar for NormR1
0
214
Member Avatar for getack

having your application perform a task by clicking a button can easily be done by using [URL="http://docs.oracle.com/javase/6/docs/api/java/awt/event/ActionListener.html"]ActionListener[/URL]. there are other Listeners that can help you out as well, so no, I'm not saying this solution is 'the one and only'

Member Avatar for rfq
0
3K
Member Avatar for jonsman

server side, or client side... with a bit of javascript you can have a bit of a dynamic touch. but there is need to scripting, that part is right.

Member Avatar for stultuske
0
96
Member Avatar for shubham123

[Code=Java] Frame2 newScreen = new Frame2(); newScreen.setVisible(true); [/Code] you mean something like that?

Member Avatar for mKorbel
0
142
Member Avatar for frivolous

[QUOTE=zeroliken;1780351]make a program that reads the metadata of the selected mp3 file Here's a link that might help; [URL="http://stackoverflow.com/questions/1645803/how-to-read-mp3-file-tags"]http://stackoverflow.com/questions/1645803/how-to-read-mp3-file-tags[/URL][/QUOTE] did your reply come before the original post??? so, the Morpheus was right. we've found the Chosen One :D

Member Avatar for zeroliken
0
298
Member Avatar for bloodbender

honestly, I have no idea of what you are doing, or why I should automatically assume why p * r should be the correct answer. could you elaborate a bit more?

Member Avatar for stultuske
0
171
Member Avatar for dennysimon

why would you want an .exe to install a .jar file? you would ruin the entire platform independent advantage you get from actually using .jar files

Member Avatar for dennysimon
0
161
Member Avatar for trektrak

[Code=JavaScript] if (time < ) [/Code] this is ... well, pretty bad. "if time smaller than ..." smaller than what? you need to actually compare it to something. just check this code and adjust yours to what you need: [Code=JavaScript] <html> <body> <script type="text/javascript"> var d = new Date(); var …

Member Avatar for Troy III
0
212
Member Avatar for Mushy-pea

personally, having the knowledge needed to get the certification is way more important than having the actual certification, and, being able to put it to good use, will make an application even more interesting in the eyes of the recruiter. I have the first Java certificate by Oracle, but believe …

Member Avatar for stultuske
0
313
Member Avatar for jayadan

Why can't you do it for decimal numbers? the logic is about the same, but you'll just need to accept a numeric type that is capable of taking decimal numbers, like float or double, and take into consideration the number of leading zeroes in your decimal part, too.

Member Avatar for jayadan
0
161
Member Avatar for maxinville

maxinville, this question is a bit weird, in my eyes. you either have copied that code from somewhere, or you are capable of getting information from a DB. say you have a class User => that has two Strings, userName, password. => that has one constructor which takes both Strings …

Member Avatar for maxinville
0
205
Member Avatar for DEAD TERMINATOR
Member Avatar for Yarra

'any of the constructors' ... ? do you know what a constructor is? I hope you do know you only have one constructor there. create a 'addSom' method which takes a double as a parameter and has either void or boolean as returnValue. void (since you don't really need a …

Member Avatar for stultuske
0
99
Member Avatar for gujinni

it means you have a null value somewhere in your code. that stacktrace tells you exactly on what line in which class. check that line, add some print statements to check what value is null, and change your code to make it impossible for a null value to appear there, …

Member Avatar for gujinni
0
120
Member Avatar for skilly

[QUOTE=skilly;1729547]how many? Will I.T. survive?[/QUOTE] are you kidding? when the meteor crashes, the sun toasts us all, they finally drop 'the bomb', there'll be nothing but cockroaches. And possibly Windows OS, but, when I think of it ... Aren't they related somehow? :)

Member Avatar for skilly
0
105
Member Avatar for Krokcy
Member Avatar for gujinni

there is no such thing as a JFrame function the way you describe it, you mean to say a Java desktop application which has a Swing GUI. first, you'll need to check for yourself, how deep and correctly you're willing to go: for instance: 2 + 6 * 3 = …

Member Avatar for gujinni
-1
209
Member Avatar for jahanruhi3@gmai

nice code. 1. add code tags 2. do understand you did not provide us of a schedule of your DB, which is where your problem lies. an invalid column index is something what may occur if you ask for the contents of the fourth column, if your table only has …

Member Avatar for stultuske
0
203
Member Avatar for wanguard
Member Avatar for shean1488

what do you mean by different numbers? and why do you do this: [Code=Java] Thread task1 = new Thread(new SleepThread("task1")); [/Code] instead of [Code=Java] SleepThread task1 = new SleepThread("task1"); [/Code] ?

Member Avatar for stultuske
0
138
Member Avatar for TIM_M_91

well ... one way is to do it in a thread. first time you click => start next time you click => sleep

Member Avatar for stultuske
0
98
Member Avatar for applejax77

just giving a possible solution, will be a lot better out there. remember, when you are writing a 'line' into your file, you're actually writing a String object (it's contents anyway) that you have stored in your memory. it may not be very easy to 'format' the contents of a …

Member Avatar for applejax77
0
246
Member Avatar for aanders5

you're trying to 'stop' a different AudioStream then the one you've 'start'ed. [Code=Java] AudioStream as = new AudioStream(blah); AudioPlayer.player.start(as); [/Code] this is the audiostream you are playing, so it would be this particular stream you would have to stop. [Code=Java] AudioStream as = new AudioStream(blah); AudioPlayer.player.stop(as); [/Code] this stream, even …

Member Avatar for Philippe.Lahaie
0
3K
Member Avatar for Ashenvale

you could also try: [Code=Java] int count = 0; String test = "my1stStringwith2Digits"; // count should return 2 : 1 & 2 for ( int i = 0; i < test.length(); i++){ if ( Character.isDigit(test.charAt(i)) count += 1; } System.out.println("Count = " + count); [/Code] but .. just a question. …

Member Avatar for Philippe.Lahaie
0
113
Member Avatar for devin2203

you could start playing with the layouts. there is a null layout too, in which you specifiy every detail about your components, for instance, if you have a JTextField, you specifiy the location of the 4 points that decide the height and width. coding like that might solve your issue.

Member Avatar for JamesCherrill
0
166
Member Avatar for CertifiedMan

well ... certifications are good if your in between projects and don't want a gap on your resume. for a starter, it might help, since (for instance) the OCJP certificate goes in deeper to the Java basics than some college courses do, but in the end, experience beats certificate, it's …

Member Avatar for jbennet
0
191
Member Avatar for mp9036

it's because your other variables are doubles. this basically means they accept decimal values, but an int doesn't. so, in 0,03 * 1,25 = ... you would get: 0 as result, because of just that, your precision levels are different, it's like converting a .png image to a .jpg, less …

Member Avatar for stultuske
0
284
Member Avatar for hasan_cemos

well, what you can do is take a screenshot, and take a transparent picture of a cursor and add it to the printscreen :)

Member Avatar for hasan_cemos
0
75
Member Avatar for Jeun

[QUOTE=tatsuya;1777960]in confused what promgram i will copy, can somebody write this program again? so that i will know what program i will use[/QUOTE] what program you are going to copy? how about 'none', write your own. about everyone here can re-write this application, but why should we? we don't need …

Member Avatar for stultuske
0
2K
Member Avatar for arathy nair

depends, what JDK have you installed? using switch-case on String objects has only been implemented since Java 7 if you work with a previous version, you can always keep a String array of the possible answers and use the index as switch value.

Member Avatar for ~s.o.s~
0
162
Member Avatar for dennysimon

that means that you will augment the value of the i variable in your v2 in your fd1 after executing that line.

Member Avatar for dennysimon
0
148
Member Avatar for jackbauer24

emmm ... what do you mean? just tested your code here and the quiz starts, so what do you mean, nothing happens?

Member Avatar for stultuske
0
193
Member Avatar for TIM_M_91

[QUOTE=Philippe.Lahaie;1776903]simply change your while condition, so that instead, you do the rs.next() in a if, so if .next returns false then you can launch say a JOption pane in the else section. then after the whole process lauch a confirm dialog and loop the while on the dialog result [CODE] …

Member Avatar for Philippe.Lahaie
0
132
Member Avatar for hubertj

show your main method (or where you call/use your class). also, I think you're getting a few logical errors there: [Code=Java] public Money(int pounds) { // To get the total pence from the input amount _totalPence= pounds; _currency = "£"; } /** * Create an amount of money in pounds …

Member Avatar for stultuske
0
166
Member Avatar for bloodbender

yes, you are stacking up. you should have your while and your call to playAgain(); in the place(method) where you originally call playAgain.

Member Avatar for stultuske
0
130
Member Avatar for wallet123

your class needs to extends JPanel or JFrame in order to add a JTextField

Member Avatar for wallet123
0
1K
Member Avatar for TIM_M_91

in which case, you could have done a better job on your DB. but if I'm correct, you have a table with (for instance) "385" (element 1) "21" (element 2) "128" (element 3) and you want to sort it so, that it becomes "21" (element 1) "128" (element 2) "385" …

Member Avatar for stultuske
0
115
Member Avatar for jayadan

no. that link is ment for "starting with Java", which is the main reason it's called "Starting java". there is no 'quick & easy' way to learn how to code. it's not just about knowing a bit about the syntax, you'll also need to understand the logic behind it all, …

Member Avatar for dymatic
0
159
Member Avatar for misha.1988

see if you can get hold of [URL="http://shop.oreilly.com/product/9780596005405.do"]this[/URL]

Member Avatar for stultuske
0
47
Member Avatar for BlackRocker

br.readLine() here you are reading a line of text, but you're not doing anything with it. store the result of that method in a String object, while ( result != null ){ // this will iterate as long as there are lines to read } you could have a lot …

Member Avatar for stultuske
0
2K
Member Avatar for jayadan

what kind of sorting do you want. what trouble are you having coding it? a very good way to start is researching what a sorting algorithm does, and write out an example on a piece of paper: [URL="http://en.wikipedia.org/wiki/Bubble_sort"]here[/URL] for instance, you'll find all the logic for Bubble Sort (including pseudocode) …

Member Avatar for stultuske
0
123
Member Avatar for ShaRp codeR

why would you want to do that? it's not correct and your course class already has that information. that arrayList is stored in the Student objects you have in your studentList ArrayList

Member Avatar for stultuske
0
162

The End.