3,927 Posted Topics

Member Avatar for Sandar Khin
Member Avatar for chandini.david

I think you are correct that the behavior did stem from some blocking, but this can still be simplified a great deal to work without a separate listening thread. Here's a re-wired version of the same that behaves itself. It's worth noting that these two versions only differ in what …

Member Avatar for chandini.david
0
213
Member Avatar for kolibrizas

The problem is that all of your code, including the thread.sleep() calls, are executing on the AWT event queue thread, which is the same thread that handles the repaint calls to update the display. You have to separate the animation updates from the painting. One way to do that would …

Member Avatar for kolibrizas
0
132
Member Avatar for kjiu

Well, to get rid of that error, don't call methods that do not exist[code]helpMenu = menuBar().addMenu(tr("&Pomoc"));[/code]

Member Avatar for kjiu
0
141
Member Avatar for Clawsy

You can customize all kinds of things about how the UI appears. A lot is possible with the methods provided by the Swing components, but if that isn't sufficient it's possible to use the the pluggable look and feel and custom UI delegates to gain a greater degree of customization. …

Member Avatar for Clawsy
0
819
Member Avatar for roshnal

Looks like you have a bit of work ahead of you. Let us know if you have specific questions about portions of it.

Member Avatar for javaAddict
0
230
Member Avatar for geek_till_itMHZ
Member Avatar for treyd

You have to actually create the JButtons in your array. You have only declared the array of references with this statement[code]JButton[][] button = new JButton[3][3];[/code]You must still initialize those objects by adding[code]button[i][j] = new JButton();[/code]in your loop before you try to do anything with them.

Member Avatar for treyd
0
130
Member Avatar for jko2326

You could define a method like [CODE]private void enableLength(boolean enable){ txtLength.setEnabled( enable ); lblLength.setEnabled( enable ); }[/CODE]so your if() code becomes[code]if (optBox.isSelected() ){ enableLength(true); }[/code]That would be a little clearer to follow and a bit less repetition. You would have one method for each of your dimensions.

Member Avatar for jko2326
0
144
Member Avatar for Gen Payten
Member Avatar for eggmatters
Member Avatar for freddyvf
Member Avatar for Samyx

Just like any anonymous implemenation[code]return new Enumeration() { public boolean hasMoreElements() { throw new UnsupportedOperationException("Not supported yet."); } public Object nextElement() { throw new UnsupportedOperationException("Not supported yet."); } };[/code]Creating a small private inner class for the enumeration and returning an instance of that would be better though. You can see …

Member Avatar for Samyx
0
92
Member Avatar for haunt_me_gently

Sounds like you probably need to fail then if you cannot show that you learned the material. Failing can be a great learning experience.

Member Avatar for Ezzaral
-1
33
Member Avatar for zandiago

[QUOTE=bobwahler;494945]And anyone who wants to claim that I am being "absurd" better do THEIR homework.[/QUOTE] None of your data shows any causal relationship to spanking though, so despite all the caps-lock words you want to sprinkle about, it still remains unsupported speculation.

Member Avatar for BestJewSinceJC
0
889
Member Avatar for eggmatters

I'm struggling a bit to understand the exact behavior you are aiming for, but if you're just saying that the "main frame" needs to take some action when the selection array changes, you can make a small listener model for this yourself very easily[code]interface SelectionListener { void selectionChanged(); } /** …

Member Avatar for Ezzaral
1
138
Member Avatar for shroomiin

The max value for int is 2147483647, so you will need to use [iCODE]long[/iCODE] for that value.

Member Avatar for Ezzaral
0
133
Member Avatar for YingKang

Read carefully what you are doing in the paintComponent() method. You are looping through every point in the array list and each time drawing a line between point1 and point2 - which are completely separate from your list of points. Perhaps you want to loop the array list by it's …

Member Avatar for YingKang
0
824
Member Avatar for whiteyoh

You are executing this statement, exactly as is [icode]"INSERT INTO user VALUES (forename, surname, dob, add1, add2, county, postCode, telNumber)"[/icode]That does not contain any of the information that you collected above it. It's just that string as written.

Member Avatar for Ezzaral
0
163
Member Avatar for Mareshal

Well, evidently you it's something that you [U]cannot[/U] do because you are here asking how to do it. I'd say you lost the bet.

Member Avatar for Mareshal
-1
212
Member Avatar for jennaNalpak

Use a scanner to get the input. Use a variable for "highest" and one for "lowest". Compare the input to those and alter as needed.

Member Avatar for BestJewSinceJC
0
166
Member Avatar for chunalt787

There are existing wrapper classes for all of the primitive types. Use Integer. Auto-boxing will handle the casting for you.

Member Avatar for chunalt787
0
4K
Member Avatar for KirkPatrick

I can't figure why you would want to render it in a list. If you want to display a series of panel entries they you would be better off putting them in a vertical box layout in a scroll pane.

Member Avatar for Ezzaral
0
201
Member Avatar for JimD C++ Newb

I think you're talking about a combo box: [url]http://java.sun.com/docs/books/tutorial/uiswing/components/combobox.html[/url]

Member Avatar for JimD C++ Newb
0
145
Member Avatar for Ravenous Wolf

There is no reason you need to create an .exe from the jar file (and many reasons [I]not[/I] to). Just read the tutorial on packaging applications as jar files: [url]http://java.sun.com/docs/books/tutorial/deployment/jar/index.html[/url] For your shortcut, you can simply use the same syntax that you would to run it from the command line. …

Member Avatar for shruti123
0
243
Member Avatar for ayaz.ali

[QUOTE=rouhaifa;990230]this is the answer about the count: int counter (string s){ count=0; for (int i=1;int i<s.length();i++) count ++; return count; }[/QUOTE] Um, no... just no.

Member Avatar for surbhi bhasker
0
412
Member Avatar for Keyaku
Re: Help

You cannot delete the account, but you can turn off all mechanisms for contacting you in your [URL="http://www.daniweb.com/forums/usercp.php"]User Control Panel[/URL].

Member Avatar for Ezzaral
0
19
Member Avatar for saraguna

[QUOTE=Josseling;1024833]Para que se usa el string.value, ayudenme a crear una clase cuenta. Manda a pedir si quieres crear una cuenta de ahorro o una de credito...[/QUOTE] Éste es cuatro años. Read the forum rules regarding posting in English please.

Member Avatar for javaAddict
0
175
Member Avatar for isuruj
Re: Ant

If you mean task instead of target, yes there is. [URL="http://ant.apache.org/manual/index.html"]Read the documentation[/URL].

Member Avatar for isuruj
-1
115
Member Avatar for williebens

There are plenty of references on calculating the distance between two coordinates, but since you're only interested in an approximate 5 mile radius, you could just use the Pythagorean theorem and assume the curvature is negligible [icode]dist = sqrt( (x2-x1)^2 + (y2-y1)^2 )[/icode] edit: You might find this post helpful: …

Member Avatar for kylegetson
0
162
Member Avatar for ceng_angel

Begin with basic network IO: [url]http://java.sun.com/docs/books/tutorial/networking/index.html[/url]

Member Avatar for ceng_angel
0
41
Member Avatar for sumain
Member Avatar for loisengleny

[QUOTE=vikujani;619072]who to find largest value of an array that we entered(in pseudocode)[/QUOTE] Who? Well, the obvious answer is [U]you[/U]. If you are having trouble, post what you have so far in a new thread and ask specific questions about it.

Member Avatar for uopgirl
0
11K
Member Avatar for eggmatters

You have a few options to work with. - Use a TableModelListener to respond to the model data value change. Your check box is just a renderer/editor for a column value in your data model. The check box is not the data. - Use a custom cell editor that extends …

Member Avatar for eggmatters
0
142
Member Avatar for clement

Well, dragging up a four-year-old thread in the wrong forum is not the way to go about it.

Member Avatar for Ezzaral
0
208
Member Avatar for aditi_19

[QUOTE=aditi_19;1018504]Could you give me your mail id?[/QUOTE] Please do not ask for help via email. Read the forum rules about [URL="http://www.daniweb.com/forums/faq.php?faq=daniweb_policies#faq_keep_it_on_the_site"]Keeping it on the Site[/URL].

Member Avatar for urtrivedi
0
7K
Member Avatar for The Mad Hatter

[QUOTE=The Mad Hatter;1006499]This is rather amusing. I posted a long, insightful write up on why I don't use Windows. And guess what - my reputation is instantly modded down. Now why would that be. Is it possible that Microsoft Trolls hang out here? I think so.[/QUOTE] Perhaps because your entire …

Member Avatar for Evenbit
-5
2K
Member Avatar for lllllIllIlllI

You can set the margin on the button with the following[code]button.setMargin(new Insets(0,0,0,0));[/code]

Member Avatar for lllllIllIlllI
0
119
Member Avatar for dernel4u
Member Avatar for jephthah

Just post your mailing address up here. I'm sure someone might be willing to send you... something... :P

Member Avatar for mahgobb
0
154
Member Avatar for ryno365
Member Avatar for nishanthaMe

[QUOTE=network18;1009073]what was the need for this, if the problem is solved please mark the thread as solved[/QUOTE] I would rather ask what was the need for this post of yours? You dragged up a two year old thread to ask that it be marked solved? You've done this recently on …

Member Avatar for network18
0
152
Member Avatar for StarZ

It is telling you that the Circle class does not have a constructor defined that takes a double parameter.

Member Avatar for Ezzaral
1
145
Member Avatar for talablink

Sun's tutorial is a good palce to start. [URL="http://java.sun.com/docs/books/tutorial/post1.0/ui/keylistener.html"]Tutorial: Writing a Key Listener[/URL] If you still have unanswered questions after that, just post them here :)

Member Avatar for phamvantu_ctk30
0
161
Member Avatar for joloms38

You have an outline, so start coding. If you get stuck, post your code and specific questions.

Member Avatar for joloms38
0
176
Member Avatar for kimbsan.sande

kimbsan, This is not a "code by request" site. No one is going to just send you this code. Show some effort and post your code with specific questions in the appropriate forums when you get stuck. It's up to you to make the effort first though.

Member Avatar for jonc
-2
75
Member Avatar for whiteyoh

You declare it as an array of CD objects, like so[code]CD[] cdList = new CD[10];[/code] and create them in the array like so[code]cdList[0]=new CD("Kaiser "," up the khazi ", 9.99);[/code]

Member Avatar for Ezzaral
1
492
Member Avatar for gunjannigam

The [icode]super.paintComponent()[/icode] call just let's the component perform whatever normal painting the super class would if the method weren't overridden. To the OP: you may want to glance over this bit of info on the Swing painting mechanism: [url]http://java.sun.com/docs/books/tutorial/uiswing/painting/closer.html[/url] Your paintComponent() code is painting the JPanel portion and then paintChildren() …

Member Avatar for gunjannigam
0
257
Member Avatar for MikeGore

As a general rule, threads are not deleted upon request. Once it's posted, it's out there for good.

Member Avatar for MikeGore
-2
80
Member Avatar for javanub123

You can use 3D apis like OpenGL or Java3D - or you can apply the perspective transformations yourself to generate the 2D representations.

Member Avatar for Ezzaral
0
71

The End.