7,116 Posted Topics

Member Avatar for andruluchko

Assuming this is homework, check the DaniWeb Member Rules. Nobody will do this for you; but if you show effort we will help. Assuming, again, that this is hoewomrk, I doubt that it's designed to teach you how to copy stuff from the web. You are only cheating hyourself if …

Member Avatar for JamesCherrill
0
881
Member Avatar for mxwarning
Member Avatar for Vardaan_1

Disagree. Never start with the GUI; always get the model first. Anyway - who said this was a GUI application? Vardaan: 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" …

Member Avatar for stultuske
0
171
Member Avatar for HyperCyber
Member Avatar for ParPau

It's line 152 (new BugfferedImage) that's going wrong - implying tha there's a problem with the ImageIcon/Image that you use to get the width & height. Try printing the ImageIcon and Image just before 152 so yu can see what's going on.

Member Avatar for JamesCherrill
0
2K
Member Avatar for Steven_10

It copies two elements starting with element 2 (NB: zero-based) to positions starting at 3. Ie it copies the values in indexes 2 and 3 (values 3 and 4) to indexes 3 and 4, overwriting the previous values of 4 and 5

Member Avatar for Steven_10
0
133
Member Avatar for redtribal23

The requirement seems incomplete to me, but I think it means: read an array of 100 numbers from a named file then read numbers from stdin. If each number matches, write an index/value message to the output file, OR, if the number causes an Exception then write an exception message …

Member Avatar for stultuske
0
204
Member Avatar for NightOwl19

The message tells you the error is on line 200 - `y=rt.getTopY()-diameter;` - null pointer means uninitialised variable, or a method returned a null that you then tried to use. In that line the only thing that could be null is `rt`. Now look for that variable - it's declared …

Member Avatar for NightOwl19
0
530
Member Avatar for divinity02

if(user_name<22) user_name is a String so you can't compare it to a number like that. Maybe you ahould be comparing the user's age, not their name?

Member Avatar for redtribal23
0
255
Member Avatar for Diellza

The System class has methods to get the current time. There's a nanosecond version as well, but your pc may not be able to supply such precise time. Just get the time before and after the sort, subtract them for elapsed time. If the result is less than about a …

Member Avatar for Diellza
0
309
Member Avatar for notywq

Oh dear, I'm almost as embarassed pointing this out as you will be... Your method is called `isValidVowel`, but you try to call a method called `isVowel`. Sorry J

Member Avatar for zolymo
0
651
Member Avatar for q8girl24
Member Avatar for q8girl24

Time to face reality. You have (at least) 4 homeworks due tomorrow, and you haven't done anything. That's nobody's problem but yours. You will get all the help you deserve here, which is approx zero. We're saving our time for people who are making a realistic effort themselves.

Member Avatar for stultuske
-1
234
Member Avatar for q8girl24
Member Avatar for Slavi

There's no way the client should be starting or stopping the server that is handling the communications with the client! Maybe your problem comes from confusing the server that talks to clients with the server that talks to the printer? In my mind they are two different things.

Member Avatar for Slavi
0
318
Member Avatar for juhitha
Member Avatar for Slavi

Java RMI would do that. It provides a version of the server's interface at the client end. Have a look at it, but be aware that it's pretty complicated and the learning curve is steep. You may find it a lot easier to build you own simple protocol where the …

Member Avatar for Slavi
0
193
Member Avatar for 2384443

You can't draw things in Swing by just drawing to some random Graphics. You have to fit your drawing into the existing Swing mechanisms. [This tutorial](http://docs.oracle.com/javase/tutorial/uiswing/painting/index.html) explains what you need to know. If that leaves you with any further questions, just ask them here.

Member Avatar for JamesCherrill
0
345
Member Avatar for moaz.amin.37

> i am waiting?????????????????? Rudeness will not get you any quicker answers. Please feel free to wait until you decide to be polite.

Member Avatar for JamesCherrill
0
2K
Member Avatar for kayleigh0411

If you have a compiler or runtime error message post the complete message plus the actual code it refers to. If your code is giving an incorrect result explain what result you get and what the correct result should be.

Member Avatar for stultuske
0
187
Member Avatar for EarhawkPH

If you want comprehensive, then Oracle's own tutorial pages are the definitive source, very complete and totally up-to-date. Start [here](http://docs.oracle.com/javase/tutorial/reallybigindex.html).

Member Avatar for EarhawkPH
-1
94
Member Avatar for chynaman

Sorry, nobody is interested in answering your little puzzle. Do you have a Java topic we can help with?

Member Avatar for JamesCherrill
0
56
Member Avatar for teekay309

What exactly do you expect anyone to do with that information? Did you have the owner's permission to reproduce that complete document on the web? Have you read the [DaniWeb Rules](https://www.daniweb.com/community/rules) that you agreed toi when you joined?

Member Avatar for JamesCherrill
-1
214
Member Avatar for mxwarning
Member Avatar for edrewc

When you are entering the item names etc, check to see if there is already an item in the ArrayList with that name and price. If there is, add the quantity to the existing Item, otherwize create a new Item like you do now

Member Avatar for zolymo
0
1K
Member Avatar for cd88

The problem is that you throw the exception from the setScores method, which doesn't allow you to recover or continue after the exception. Data format errors are best handled inside the data entry code, something like (pseudo code) for each item that needs to be entered boolean needValidInput = true; …

Member Avatar for JamesCherrill
0
236
Member Avatar for KetraCoder

In real life nobody codes applications in bytecode. If you can't do something in Java then its very unlikely that you could do it in bytecode. Unless you plan a career in writing Java compilers or JVMs you will never write a single line of bytecode. The only time "normal" …

Member Avatar for JamesCherrill
0
253
Member Avatar for SadiqGwarzo
Member Avatar for VinVins

Just call `setVisible(false)` or `dispose()` on your JFrame. It's the same regardless of what you are doing with threads or timers. What's your real question - do you want to know how to use a timer?

Member Avatar for JamesCherrill
0
40
Member Avatar for LianaN
Member Avatar for stultuske
0
19K
Member Avatar for school12345

You just copy/pasted your assignment without even a moment taken to explain what help you need. That's highly disrespectful 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 Loiba
-4
159
Member Avatar for larnacode
Member Avatar for vivekH
Member Avatar for AbstractEden

In the sort, instead of swapping names and gpas, just swap the two Student objects. That's easier, and it won't break when you add another field, eg date of birth, to the student class. It's also very bad practice for a sort to change the values in the objects its …

Member Avatar for stultuske
0
4K
Member Avatar for moaz.amin.37

... also, you have two instances of Square1 (lines 11 and 21). You try to use the value from the first instance, but you only execute the run method for the second instance ... and, line 29, a printStackTrace() will show you the stack. getStackTrace() returns the stack, but you …

Member Avatar for moaz.amin.37
0
1K
Member Avatar for Benny_1

Start by just sketching it out on paper. Fiddle with that until it looks goood. Then (and not before) think about how to implement that with panels, layout managers etc.

Member Avatar for Benny_1
0
305
Member Avatar for surya55

... the `doStuff(x,y)` case is a little more interesting: because there's no method that takes an int and a boolean, the best fit the compiler can find is to auto-box the int into and Integer object and the boolean into a Boolean object, then use the `Object...` method.

Member Avatar for JamesCherrill
0
275
Member Avatar for FazeLessWhite

I know nothing about Android development... but shouldn't there be some kind of reference to the audio source (file name etc) somewhere?

Member Avatar for FazeLessWhite
0
224
Member Avatar for ShamirSuhaimi

You already have a default constructor (line 7). That's where you can set the X values.

Member Avatar for Slavi
0
143
Member Avatar for jayesh somi

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

Member Avatar for JamesCherrill
0
291
Member Avatar for redtribal23

Your isFull methods looks suspicious.. what's wrong with `count == elements.length` Also your code assumes the array is the default size (eg lines 34, 45). What happens if you try a queue of any other size ?

Member Avatar for Tarek_2
0
358
Member Avatar for NightOwl19

The normal way to create a menubar as part of the frame and without confusing the content pane's layout, is main.setJMenuBar(menu); see http://docs.oracle.com/javase/tutorial/uiswing/components/toplevel.html

Member Avatar for NightOwl19
0
150
Member Avatar for Kuganithy

You have not given any of the code, so we can only guess. It sounds like one of the needed methods has not been written yet.

Member Avatar for JamesCherrill
0
62
Member Avatar for ali11

You are trying to convert Integers to ints, and you can't use generics to refer to primitive types.

Member Avatar for jwenting
0
4K
Member Avatar for mwenyenia07

No. We don't do your homework! Read the [DaniWeb Rules](https://www.daniweb.com/community/rules), and start again.

Member Avatar for jwenting
-2
210
Member Avatar for kayleigh0411

Each of your get methods calls the next get method, despite the fact that the original actionPerformed calls them all anyway. This will result in multiple calls to the later get methods, and thus mutiple error messages

Member Avatar for Tarek_2
0
207
Member Avatar for engrjd91
Member Avatar for moaz.amin.37
Member Avatar for moaz.amin.37
0
259
Member Avatar for SQLpower
Member Avatar for SQLpower
0
288
Member Avatar for ksekwamote
Member Avatar for sekwamote
-2
2K

The End.