7,116 Posted Topics

Member Avatar for eldiablo1121

Line 67: Isn't this case where the brackets DO match? (wrong message text) Anyway, your bug is because the `else` on line 72 doesn't match the `if` you think it does. Fix your indentation and this should become clear, as will the fix.

Member Avatar for JamesCherrill
0
166
Member Avatar for aaa12bv

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 JamesCherrill
-1
87
Member Avatar for edward.park.94

Either Use an inner loop that prints the correct number of asterisks or blanks for each window or Have a long-enough string initialised to lots of asterisks and print a substring of the right length from that

Member Avatar for JamesCherrill
0
148
Member Avatar for nyepoypo

Use a javax.swing.Timer When the timer expires it runs its actionPerformed method, where you can display a message or whatever you like. See the API doc for details

Member Avatar for Xabush
0
1K
Member Avatar for asif49

I'm a huge fan of Scrum http://en.wikipedia.org/wiki/Scrum_%28software_development%29 It's the exact opposite of the useless waterfall approach. It's one of the original Agile class of methodologies. I worked for Jeff Sutherland http://en.wikipedia.org/wiki/Jeff_Sutherland in Easel in the 90's and everything we did was some kind of variant on scrum. It works.

Member Avatar for JamesCherrill
0
141
Member Avatar for MistaGeorge

stultuiske's comments are correct, but his solution doesn't quite apply to your case. His advice is correct for printing an instance of a class you define, but not for printing ordinary arrays. The `Arrays` class has a static `toString` method to convert ordinary arrays to sensible Strings for printing, like …

Member Avatar for MistaGeorge
0
429
Member Avatar for Wilfred_2

Hello Wilfred, welcome to DaniWeb. We don't do people's homework for them. If you have a specific problem with some aspect of Java then we're glad to help, but simply copy/pasting your assignment and waiting for an answer is just insulting. DaniWeb Member Rules (which you agreed to when you …

Member Avatar for JamesCherrill
0
124
Member Avatar for Mohamed_30

Do you simply want to start the application in that jar executing, or do you want to use the classes inside that jar?

Member Avatar for JamesCherrill
0
235
Member Avatar for LyingInAHammock

I'm no expert, but maybe this will help: There's a simple formula for the distance between two long/lat points (Google!). You can rearrange that that to make the distance fixed and either the second long or the second lat the unknown. This will give you four new long/lat points, N.S.E.amd …

Member Avatar for jwenting
0
564
Member Avatar for jackjuma12

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
115
Member Avatar for Ndey yassin
Member Avatar for isslam.akkilah.5

Your file name looks wrong - too many back-slashes. YOu only need two backslashes in your String literal to represent a single backslash in the file path

Member Avatar for isslam.akkilah.5
0
144
Member Avatar for Amudha.M

Your second line creates a byte array of the right size, but you do not copy the data from the blob into that array, so the array is just full of zeros. Use `getBytes` to convert the blob to a byte array (see the API dec for Blob for details).

Member Avatar for JamesCherrill
0
239
Member Avatar for stud101

Welcome to DaniWeb! People here will be happy to help you - but you'll get the best value from that if you ask specific questions. Looking at your code there are a few small points of feedback that jump out... You have a constructor that just goes on for hundreds …

Member Avatar for JamesCherrill
0
315
Member Avatar for Doogledude123

That's just a restriction on inner class binding to local variables (just ask if you want he full explanation). Simply make your timer variable an ordinary instance variable and the inner class will be abse to use it.

Member Avatar for JamesCherrill
0
1K
Member Avatar for Doogledude123

Standard procedure: print all the variables at that line to see which one is null. It could be controller, controller.totalGoldLabel, game, or the returned value from game.getTotalGold()

Member Avatar for Doogledude123
0
7K
Member Avatar for custurd122000

There's a lot of very tangled code there, so maybe best to start again and go one step at a time. First, you need to read the file and create an array of Computer objects. Read each line, extracting each of the values on that line to local variables, then …

Member Avatar for cgeier
0
512
Member Avatar for anisha.silva

Did you look at the tuorials on the Eclipse web site, eg http://www.eclipse.org/articles/Article-Your%20First%20Plug-in/YourFirstPlugin.html or http://wiki.eclipse.org/FAQ_How_do_I_write_an_editor_for_my_own_language%3F

Member Avatar for anisha.silva
0
419
Member Avatar for sk8ergirl

How many times have we said this in the Java forum... Never NEVER *NEVER* do this when writing new code: } catch (Exception e) { } If/when there is an error you just told Java that you didn't want to know anything about it, and please discard the detailed error …

Member Avatar for JamesCherrill
0
162
Member Avatar for jayturner
Member Avatar for Rahul47

Beuase all the methods are the same, there's just one copy in memory. That's loaded when the class is loaded ie sometime before you first use it. The same is true of static variables. Memory for instances of classes is created when the instance is created - that's a few …

Member Avatar for JamesCherrill
0
137
Member Avatar for jrosh

Hello Sardar. Welcome to DaniWeb. Please take a few minutes to familiarise yourself with DaniWeb Memnber Rules before posting. eg "Do ensure that all posts contain relevant content and substance and are not simply vehicles for external links" Also, this thread is 4 years old, so any answer will be …

Member Avatar for Sardar_1
0
2K
Member Avatar for aravind326
Member Avatar for aravind326
0
391
Member Avatar for anand01

This is from WikiPedia... > In 2007 Oracle announced, that for the upcoming release of Forms version 11, Jinitiator would no longer be needed and that users should migrate to the Sun Java plug-in. In January 2010, a product obsolescence desupport notice was posted saying that JInitiator would no longer …

Member Avatar for jwenting
0
196
Member Avatar for JamesCherrill

This is my 10,000th post in the DaniWeb Java forum. so I hope I won't get an infraction for being off-topic. I just thought this would be the perfect opportunity to thank all the people who have helped to make this such a valuable and rewarding experience for me. I …

Member Avatar for peter_budo
6
240
Member Avatar for tricket_7

This problem breaks down into two distinct stages: 1. Collect all the info from the user (10 names, 10 counts) and store those in two arrays... then... 2. Using that info stored in the arrays, use a loop (see above) create and start 10 threads You can't mix the user …

Member Avatar for tricket_7
0
729
Member Avatar for matthewborgcarr

You really haven't posted enough code to show where the problem lies, but from those two lines here's a guess... are you sure you are updating the mainPanel variable when opening the second main JFrame?

Member Avatar for mKorbel
0
248
Member Avatar for sheelap

If you Googled you would very quickly find the Oracle tutorial: http://docs.oracle.com/javase/tutorial/deployment/jar/index.html but if you are using NetBeans or Eclipse then both those IDEs have their own tools to simplify creation of jar files

Member Avatar for rubberman
0
245
Member Avatar for sami11

I'm sure there are people here who can help. *Exactly* what help do you need?

Member Avatar for sami11
0
183
Member Avatar for stillHaveHope

Hi gianfranco Welcome to DaniWeb Thanks for your post, but did you notice the question was 3 years old? It's unlikely he is still waiting foir an answer! Also, we prefer to help people learn Java rather than just do their homework for them. Just giving a solution they can …

Member Avatar for radhakrishnan.akshai.3
0
9K
Member Avatar for Fatima_110

If there's absolutely nothing in the beginner's project thread that "satisfies your needs", then maybe you can explain what your needs are, so someone can make suitable suggestions.

Member Avatar for Fatima_110
0
217
Member Avatar for ZaneDarklace

Hello ZaneDarklace, welcome to DaniWeb. Is there a question associated with this code?

Member Avatar for ZaneDarklace
0
923
Member Avatar for Doogledude123

You are looking at docs for JDK/JavaFX version 8, but using a version 7 implementation. There are many changes and enhancements in 8. You can download a "developer preview" of JDK 8 (includes JavaFX 8) from the Oracle web site. We're only a month a way from full release of …

Member Avatar for Doogledude123
0
356
Member Avatar for bjnzzzle

> It reads a sequence of strings, each on a separate line, and stores them in an array, let call it input1, with one string per cell, in the order they were read. > ... > Same thing with 2nd sequence. You have tried to combine these two steps into …

Member Avatar for JamesCherrill
0
347
Member Avatar for Pyler

The loop on line 17 looks suspicious. Why not loop all the way down the list? Line 15; what's the initial value of *game*?

Member Avatar for JamesCherrill
0
2K
Member Avatar for V3N0M

Here are some *simplified* answers to start with - you may want some follow-up questions. A class is a data type - think of it as a struct plus some related methods. Eg a Person class has individual variables for for name etc, date of birth etc and methods to …

Member Avatar for JamesCherrill
0
150
Member Avatar for abhishek.anand.37017794
Member Avatar for CoilFyzx
Member Avatar for Doogledude123

There's no problem mapping a Color to a point in 3D space, nor in associating a colored pixel or two with that point. As with any 3D data representation it may be more or less useful, depending on what the data is. If it maps to a surface then that's …

Member Avatar for Doogledude123
0
291
Member Avatar for kim2_0016

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 Please start your own new thread for your question, and post your code to show what you have done so …

Member Avatar for fliponymous
0
543
Member Avatar for GUIPaPa

Overridding `paint` rather that `paintComponent` is almost always a mistake. In this case you call super.paint - which paints the Panel *and all its children*, then draw the background image over the top of all that. You may also need to set one or more of size/preferredSize/minimumSize for your JPanel …

Member Avatar for GUIPaPa
1
503
Member Avatar for havoc0921

Don't just take code and try to paste it into your program. Spend 10 brief minutes with the relevant tutorial so you will understand what to do, and why... http://docs.oracle.com/javase/tutorial/essential/exceptions/index.html @cgeier: It's better to use `e.printStackTrace();` in your catch so you get the complete stack as well as the exception …

Member Avatar for JamesCherrill
0
224
Member Avatar for angel06
Member Avatar for trubble

Naresh. It's good that you want to help, but your post exactly duplicates the solution given by dlarytm two days ago. Please take a moment to read the whole thread before posting, and ensure that your posts always add something new. Thank you.

Member Avatar for JamesCherrill
0
181
Member Avatar for eldiablo1121

That looks like you didn't enter an int value in response to the "Enter first coeffecient: " prompt. ???

Member Avatar for JamesCherrill
0
1K
Member Avatar for seethu214

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
0
182
Member Avatar for shaiqi
Re: Java

You will find much useful inmformation [here](http://www.daniweb.com/software-development/java/threads/99132/starting-java-java-tutorials-resources-faq)

Member Avatar for JamesCherrill
0
56
Member Avatar for shroomiin

You can simplify this by using "else" rather than 2 "if" tests [CODE] if (hours<=40) pay = rate * hours; else pay= (hours - 40 * 1.5 * rate) + (rate*hours);[/CODE] or compress it all into 1 line with the "?" operator [CODE]pay = (hours<=40) ? rate * hours : …

Member Avatar for cmackbrown
0
978
Member Avatar for harshi22

This is not a "we write code for you for free" service. If you are having a problem with some specific code you are writing then please explain exactly what that is. In the meantime, please be aware of the DaniWeb Member Rules (which you agreed to when you signed …

Member Avatar for rubberman
0
138
Member Avatar for Ankit_8

What is your major subject for your degree? Plagiarism? Seriously: If you need to "make an app" then just copying someone else's code is not going to qualify. If you want help to design and develop a pothole detection app then please free free to ask any *specific* questions here.

Member Avatar for rubberman
0
314

The End.