4,084 Posted Topics

Member Avatar for cookiejarvus

probably an error in your actionListener, or you haven't attached it to the right components, or you didn't check for the source correctly. that's a lot of code to go through if you don't know what you're really looking for.

Member Avatar for stultuske
0
199
Member Avatar for subramanya.vl

and that if you "change" the value a lot, and don't need to keep the old value, as is often the case when using Strings, you'll stuff a lot of values you don't need into your memory.

Member Avatar for stultuske
0
84
Member Avatar for rachelmorg

nest your while loops: while (num != 1){ while (e == true && num != 1) { do statement } while (e == false && num !=1) { do different statement } } System.out.println(value); something like that might help you out.

Member Avatar for rachelmorg
0
144
Member Avatar for javaprog200

trust me, that does not return "[B@3df78040". I don't know how you added that, and since JamesCherill showed you exactly how to change your code, I also have no idea how you could 've gotten it wrong, but apparently, you did. re-read his post and try again.

Member Avatar for javaprog200
0
219
Member Avatar for manaila

[This](http://stackoverflow.com/questions/3844307/how-to-read-text-file-from-relative-path-in-a-project) might shed a little light on the subject.

Member Avatar for subramanya.vl
0
211
Member Avatar for davidthefritz

I've got the feeling your error starts here: negCheck = stdin.nextDouble(); make sure you provide correct input. if necessary, run the code first with hardcoded values.

Member Avatar for stultuske
0
209
Member Avatar for ascyndance6y

well, if you don't know anything about a programming language, thinking about a project is like a toddler that just learned how to crawl, and think he can run a marathon. no, Java isn't that hard to learn, but if you want to learn it decently, it still might take …

Member Avatar for ascyndance6y
0
377
Member Avatar for ibthevivin

hate it to tell you, but if I look at the assignment and then your code, I can't help but feeling you're way off. best thing is to split the assignment in logical steps, and to try and write and combine those to a working piece of code.

Member Avatar for Taywin
0
250
Member Avatar for Ritesh_4

why do you have unsorted lists if you don't use them? I think you'll easily be able to do that, with using the right widths and floats along with your div tags.

Member Avatar for Ritesh_4
0
62
Member Avatar for rahulrulez

satdude, this thread is over a year old. if you have a problem, please start your own thread and be a bit more specific. in a lot of "I have the same problem" posts, it turns out that even though it "seems" related, it's not.

Member Avatar for stultuske
0
1K
Member Avatar for ozman26

no matter what, unless that method is static, you shouldn't call it like this: BTEST.call(); use public and private access modifiers.

Member Avatar for JamesCherrill
0
205
Member Avatar for amvnwguy

looks to me like you have to input the values for the elements manually, that is, going on this: > The program reads the food grid from the keyboard

Member Avatar for stultuske
0
119
Member Avatar for java123456

read the code, write down (in pseudo code) step by step what it does, and what values are assigned, that 'll help understanding it.

Member Avatar for maurice91
0
164
Member Avatar for viona.diminarthi

well, what do you think this will do d = Double.parseDouble (SubTotal.getText ()); if SubTotal's value is ""? before you do something as above: d = 0; if ( !SubTotal.getText().equals("")) d = Double.parseDouble(SubTotal.getText());

Member Avatar for stultuske
0
374
Member Avatar for vipin.luhach

you can write sql, sure, you can also use a framework like hibernate. you can check the number of results you get in your resultset, or check if it returns null.

Member Avatar for stultuske
0
219
Member Avatar for Violet_82

no. you'll show that line at least once (the first iteration) I'm not sure why you're going for "findWithinHorizon", you could also have gone for next or nextLine, and just read the first char.

Member Avatar for Violet_82
0
198
Member Avatar for jsp418

you can use the instanceof operator to check of which class each animal is an instance.

Member Avatar for subramanya.vl
0
205
Member Avatar for nickcolb

can you please provide the complete error message? it tells you on which line the exception is thrown, so if you look at that line in your source code, it should be easier to find out where it's going wrong.

Member Avatar for radhakrishna.p
0
225
Member Avatar for Violet_82

just google "Scanner java api" and go to the latest version (7), then search on the page, and you'll find this: [that method in the api](http://docs.oracle.com/javase/7/docs/api/java/util/Scanner.html#findWithinHorizon(java.lang.String, int))

Member Avatar for Violet_82
0
248
Member Avatar for LdaXy
Member Avatar for smart.saravana.1

join you in what? and what common language will you use? looks to me like english isn't the best option. what you should realize is: Steve Jobs and all those others who made name and fame by (re-)inventing and/or improving systems in a way nobody thought possible, didn't start out …

Member Avatar for smart.saravana.1
-1
154
Member Avatar for jinxmc

what exactly is your question? where are you stuck? for instance, keep in a file an array with the countries: static String[] countries = {"Belgium","Netherlands","Germany"}; // just an example //and for each of these countries, you keep an array with cities: static String[] bCities = {"Antwerp","Brussels"}; static String[] nCities = …

Member Avatar for stultuske
0
211
Member Avatar for Nandomo

yes, that's possible, but would make the private method useless. private methods are normally used to perform "private" stuff. at this point, it is clear that your teacher does not want your main method to have access to your private method (otherwise he would've told you to make it public). …

Member Avatar for Nandomo
0
200
Member Avatar for asif49

eh? you can't extend more then one class directly, besides: extending a class is in the (compiled) code, so you can't do that "on the fly". what you could do (I guess) is something like this: interface MyMarker{} public class MyFirstClass extends Parent1 implements MyMarker{ } public class MySecClass extends …

Member Avatar for stultuske
0
93
Member Avatar for nvijay

to give some more information about my downvote towards your post: this is a community of volunteers who will help you learn and improve your code and coding skilsl, not 'devZ-for-hire', and no, we won't do your homework for you, not even if you post this three times. the community …

Member Avatar for stultuske
0
157
Member Avatar for arcticman452

depends on the action on which you want something performed. when selecting a new value in a dropdownlist? after clicking a button? after typing a character in a textfield?

Member Avatar for jalpesh_007
0
203
Member Avatar for Inori

different things: 1, if possible: use the Swing components, not the older AWT stuff. 2. don't forget to actually link your buttons to your actions. you'll have to add an ActionListener

Member Avatar for stultuske
0
187
Member Avatar for harinath_2007

if they are external, they can be placed: "external". do remember that your java code is not dependant of the IDE you use, so if it works in eclipse (or editplus), it'll (should) work in netbeans as well. but the path to the images might differ, since it's not the …

Member Avatar for harinath_2007
0
91
Member Avatar for angel sunflower

the best way would be to re-write your sql code. but correct, this time.

Member Avatar for angel sunflower
0
976
Member Avatar for aabbccbryanmark

either ignore it, or don't use unchecked or unsafe operations .... if you want more information about what the 'problem' (it's more a remark then a problem, but still) is: do as the message suggests and recompile with the -Xlint:unchecked argument.

Member Avatar for stultuske
0
255
Member Avatar for joe.crook.9

Zach&Kody: re-read your post, and you'll see why that's impossible. (and certainly not what is wanted). either you return a default value if none of the cases are true, or throw an Exception.

Member Avatar for stultuske
0
176
Member Avatar for WaltonPan

logical errors tout court: switch (int index) { case 1: if(index=0) do you know what a switch and an if is? do you know the difference between = and == ? what exactly are you trying to do in these three lines?

Member Avatar for aravind326
0
248
Member Avatar for Neversleepin

jLabelWithError.setVisible(true); and to hide it again: jLabelWithError.setVisible(false);

Member Avatar for Neversleepin
0
2K
Member Avatar for Neversleepin

do you still get that error? well, if your code is like: > // > Here I add ... then that's bound to cause problems. is the above your entire code? you're not closing your method/class. if you still get an error, can you post the correct (and complete) code, …

Member Avatar for Neversleepin
0
15K
Member Avatar for Violet_82

ehm ... no, if it's a static method/member, you don't need an instance of the class. you can call it through an instance, but that would be confusing and might make you believe that the value of the static member depends on the instance, which it doesn't. static means: class …

Member Avatar for Violet_82
0
2K
Member Avatar for ncis_sg1

what exactly has this got to do with packages? your constructor needs a space between public and Square looks like you are accessing the Square variables directly, so maybe re-think that. for instance: your method to calculate, you could do something like this: public int computeSurfaceArea(){ return depth*super.computeSurfaceArea(); } and …

Member Avatar for ncis_sg1
0
144
Member Avatar for arohideep13

Carmageddon (the original game) and Freelancer. there were some other games that caught my 'attention' for a few weeks, but these two ... bought them once, still play them. Carmageddon (thanks to GoG.com) still playing after 15+ years, Freelancer after (almost) 10 years

Member Avatar for Bob Hensley
0
296
Member Avatar for Patrick_Walsh

personally: a plastic ball, jumping ropes, maybe a doll or two, and a garden. there's no doubt she'll get a gaming system sooner or later, but I wouldn't recommend too soon: I've seen kids, just over ten, who've had their first console when they were six. summer or winter, they …

Member Avatar for <M/>
0
259
Member Avatar for cryptique

the best kind of project is the one you think of yourself. choose one you can do using the techniques you've learned. since we don't know your curriculum, don't expect us to know the ins- and outs of it. choose a subject that you're interested in, thus avoiding getting 'bored …

Member Avatar for Yakz
-1
222
Member Avatar for harinath_2007

don't. program them manually. generated Swing code is crap and very difficult to maintain.

Member Avatar for stultuske
0
299
Member Avatar for mukiibi

it makes it needles complicated. just a short example: int one = in.nextInt(); int max = one; int low = one; int two = in.nextInt(); if ( max < two ) max = two; if ( low > two ) low = two; int three = in.nextInt(); if ( max …

Member Avatar for bibiki
0
225
Member Avatar for hwoarang69

for jdbc:mydql://localhost//a_upload there's a typo there. try "mysql" instead of "mydql"

Member Avatar for stultuske
0
331
Member Avatar for challarao

also: whoever asked you this, either wasn't talking about java, or doesn't know what (s)he's talking about. In java, there are no functions, just methods. besides, just because you pass a parameter, doesn't mean you have to use it (ok, it's not logical to pass a parameter you don't use, …

Member Avatar for stultuske
0
203
Member Avatar for PriteshP23
Member Avatar for Ancient Dragon

They claim to be a "Microsoft Gold Certified Partner", but I don't see their name ("Soft Buy") on the list I found for Microsoft Partners, so I doubt it.

Member Avatar for <M/>
0
161
Member Avatar for sapure
Member Avatar for riahc3
0
232
Member Avatar for kristenw17

I think you would be better of learning a bit more about [IO operations](http://docs.oracle.com/javase/tutorial/essential/io/file.html) in Java.

Member Avatar for JamesCherrill
0
348
Member Avatar for LastMitch

pretty sure I'm not going to win it, and that's about as far as my personal interest goes.

Member Avatar for tech-ultrasonic
0
290
Member Avatar for naniavss

the classical way would be by using the <img > tag, but you can always do it in css as well.

Member Avatar for stultuske
0
61
Member Avatar for sneha_07

what do you mean: is only working for the first? what happens if you use a next one? is there an error message? add some print statements through the code to see what happens/is executed. also: do understand that using it like that, you might easily mistype one of those …

Member Avatar for stultuske
0
132

The End.