3,927 Posted Topics

Member Avatar for zeeshanvirgo
Member Avatar for Steven_B
0
167
Member Avatar for ithelp
Member Avatar for vegaseat
0
494
Member Avatar for aanders5

There are a few different ways to manage that with relative paths or getResource(). Take a look at [URL="http://download.oracle.com/javase/tutorial/uiswing/components/icon.html#getresource"]this info in the tutorial on using Icons[/URL].

Member Avatar for aanders5
0
152
Member Avatar for jingda

You ask for blessings and have this in your sig? > "It is not sufficient that I suceed - all others must fail." Under such a doctrine we should be hoping you fail. (You also misspelled succeed)

Member Avatar for e-papa
0
166
Member Avatar for xzbackup

It was snipped for this reason: [url]http://www.daniweb.com/forums/faq.php?faq=daniweb_policies#faq_keep_it_spamfree[/url] jingda is asking you to violate the forum rules.

Member Avatar for jingda
0
140
Member Avatar for sariberri

Use [URL="http://download.oracle.com/javase/7/docs/api/javax/swing/JList.html#getSelectedIndices()"]JList.getSelectedIndices()[/URL] to get all of the selected indices. Edit: Cross-posted. [URL="http://download.oracle.com/javase/tutorial/uiswing/components/html.html"]Use html[/URL] in your label to generate multiple lines.

Member Avatar for sariberri
0
180
Member Avatar for prity

[B]>so please give me suggestion as soon as possible [/B] My suggestion: Get started.

Member Avatar for rubberman
0
77
Member Avatar for CorruptionInc

You should change the declaration to use Measurable instead of Quiz. [B]> Given that Quiz implements Measureable there should not be an error [/B] Well, in this case he could explicitly cast the Measurable back to Quiz because he knows that is what he supplied to DataSet, but it wouldn't …

Member Avatar for CorruptionInc
0
1K
Member Avatar for Slyvr

Try [URL="http://download.oracle.com/javase/7/docs/api/javax/swing/SwingUtilities.html#convertPointFromScreen(java.awt.Point,%20java.awt.Component)"]SwingUtilities.convertPointFromScreen(java.awt.Point, java.awt.Component)[/URL].

Member Avatar for Slyvr
0
4K
Member Avatar for yo123

If you need to make the calculations yourself at the pixel level, you first calculate the luminence from the RGB values [icode]y = .30*R + .59*G + .11*B[/icode] and then set the R,G,and B values to that calculated value. [url]http://en.wikipedia.org/wiki/Grayscale#Converting_color_to_grayscale[/url] Drawing the image to a new BufferedImage of TYPE_BYTE_GRAY, as …

Member Avatar for valiandra
0
565
Member Avatar for gedas

This may be helpful: [url]http://www-personal.umich.edu/~lsiden/tutorials/signed-applet/signed-applet.html[/url]

Member Avatar for Ezzaral
0
106
Member Avatar for SeanC

Either populate the list before you add the listener or set a boolean flag [iCODE]initialized[/iCODE] and check [iCODE]if (initialized) {...[/iCODE] in your listener. Edit: You may check to see if ListSelectionListener works better for your needs also. I wouldn't think that one would fire any event as the model is …

Member Avatar for Ezzaral
0
406
Member Avatar for ahsan1

Yes, it is a duplicate. Closing this one. Please refer all further discussion to the other thread [url]http://www.daniweb.com/web-development/php/threads/357856[/url].

Member Avatar for Ezzaral
0
313
Member Avatar for sikelesS

Move your declaration of [iCODE]ArrayList<String> studentArray[/iCODE] up to the class level, instead of within your readFile() method.

Member Avatar for Slimmy
0
192
Member Avatar for gstavreski

It's certainly not urgent to me. Post what you have started with and specific questions or error messages. No one will do your homework for you.

Member Avatar for gstavreski
-3
149
Member Avatar for Slyvr

Are you sure you haven't added the listener more than once? Because that is kind of what your output looks like. I don't see anything wrong with your listener code itself.

Member Avatar for Slyvr
0
137
Member Avatar for chaliworm

So what is your question? Dumping some code that you found on the internet and can't compile isn't really what we mean about showing some effort if you expect to get any help. [B]> need a code tht ...[/B] You've come to the wrong place if you expect anyone to …

Member Avatar for Ezzaral
0
257
Member Avatar for chetan_8187

If you mean you want to open it for general browsing in the OS (with Explorer for example), you'll have to use Runtime.exec() or ProcessBuilder for that.

Member Avatar for sairakhushi
0
938
Member Avatar for SCass2010

[B]> or am I trying to do something that is either impossible or close to impossible[/B] Not at all. You should definitely use a loop to create all of those components. They only differ by the player index. You could also use a for-each style loop[CODE]for(Player p : players){...}[/CODE]

Member Avatar for SCass2010
0
1K
Member Avatar for ajayb

[ICODE]Dispose()[/ICODE] the frame you want to close and [ICODE]setVisible()[/ICODE] the one you want to open.

Member Avatar for Ezzaral
0
105
Member Avatar for sumprit

It's no different than displaying any other data set in a table. Create a table model that returns the values for a given cell. You can do that any way that you wish - a single result set from a query, two individual result sets that you manage by index, …

Member Avatar for Ezzaral
0
106
Member Avatar for Dean_Grobler

Metal/metalcore/(other sub-genres, blah blah blah) Newer: As I Lay Dying, Lamb Of God, Killswitch Engage, Parkway Drive, Disarmonia Mundi, In Flames Older classics: Megadeth, Metallica, Anthrax, Testament, Slayer, Iron Maiden, Queensryche

Member Avatar for evanism
0
215
Member Avatar for sariberri

You set your frame layout to null, but never set the location of your panel. The following will make them show up within the panel (though it's not a layout you're going to want to keep once you see it)[CODE]JPanel p=new JPanel(); p.setLayout(new FlowLayout()); p.setBounds(20,20,100,130); p.add(sizes); p.add(small); p.add(med); p.add(large);[/CODE]I'd recommend …

Member Avatar for Ezzaral
0
298
Member Avatar for Taimoor Rana

You never reset [ICODE]yIncrement[/ICODE] though, so after the first time [ICODE]paintComponent[/ICODE] is called, possibly even before the window is completely done showing itself, it will go below 25 and never again enter that loop. [iCODE]paintComponent()[/iCODE] gets called every time the component needs to be redrawn, which can be triggered by …

Member Avatar for Taimoor Rana
0
144
Member Avatar for joseph.roy9

That's not a Java question, it's a SQL question. Look up how to use the LIKE condition. Then you can refer the tutorials mKorbel posted above for questions about the UI.

Member Avatar for Ezzaral
0
64
Member Avatar for michelle2003

Nice to see people even welcome the members who have already gotten themselves banned ;)

Member Avatar for e-papa
0
139
Member Avatar for kiswah03

Be sure that you have specified the main-class attribute in your manifest file.

Member Avatar for kiswah03
0
111
Member Avatar for danholding
Member Avatar for danholding
-4
552
Member Avatar for rampapz

Copied directly from [URL="http://www.daniweb.com/software-development/java/threads/234056/1029364#post1029364"]here[/URL]. If the OP can't even determine if the code he blindly copies meets the requirements for his assignment, he deserves to fail the course.

Member Avatar for javaAddict
0
228
Member Avatar for Akins72

You haven't stated what you are having trouble with. Aside: I'd recommend changing your indentation to no more than 4 spaces and use it consistently. You've got code pushed all over the place there.

Member Avatar for Akins72
0
207
Member Avatar for ajaybali

This post was just copied and pasted here by a lame spammer so I'm closing it but leaving the replies intact, since the answers may help someone else.

Member Avatar for Ezzaral
0
88
Member Avatar for ajaybali

This post was just copied and pasted here for spam purposes. Closing, but leaving intact to preserve the effort of those who answered.

Member Avatar for Ezzaral
0
78
Member Avatar for 47pirates

The real question ought to be [I]should[/I] you create an mdb with Java and I would answer: Only if you absolutely have to due to other constraints on the project. If you can use any other database, do so. For a file-based database, [URL="http://www.h2database.com/"]H2[/URL] is great.

Member Avatar for mKorbel
0
249
Member Avatar for rohit2

This may work for you. Assuming [ICODE]textPane[/ICODE] on a [ICODE]panel[/ICODE][CODE]SwingUtilities.convertPoint(textPane, textPane.getCaret().getMagicCaretPosition(), panel)[/CODE]

Member Avatar for Ezzaral
0
119
Member Avatar for jingda

I would have to disagree with AD there. That seems to be a guaranteed recipe for derailing other people's threads.

Member Avatar for Ezzaral
1
171
Member Avatar for Hey11

You do realize you are potentially reassigning the value of [iCODE]a[/iCODE] many times, right?

Member Avatar for jwenting
0
97
Member Avatar for Fortinbra

Git, Mercurial and Subversion are all popular. It looks like most of them have plug-ins to work with Visual Studio. We're using Subversion here and I like it well enough, but we work in Java so I can't speak to it's usage within VS.

Member Avatar for divin757
0
328
Member Avatar for Taimoor Rana

You need a mechanism for the UI to get an updated time value. You could either poll the watch on an update timer in your frame (a "pull" model) or you could register your frame as a listener or "observer" in the Watch class (a "push" model) and let Watch …

Member Avatar for Taimoor Rana
0
846
Member Avatar for Aepexx

I don't know where to start either because that has to be the poorest written assignment I have ever seen.

Member Avatar for dononelson
0
138
Member Avatar for penguino138

Do you think people here can read your mind or see over your shoulder? Post your code and the stack trace.

Member Avatar for penguino138
0
185
Member Avatar for Aepexx

Post the code you have to start with. Ask specific questions about what you are having trouble with and what you have tried so far.

Member Avatar for Aepexx
0
180
Member Avatar for ChieftanBill

Why not use [URL="http://download.oracle.com/javase/6/docs/api/java/lang/String.html#substring(int,%20int)"]substring()[/URL] instead of the loop? It reduces the whole method to about 5 lines. You still need to reduce the string each invocation until you reach a terminating condition. Your current code has no termination condition and hence the infinite loop.

Member Avatar for Ezzaral
0
95
Member Avatar for casinoua

Merged duplicate threads. @casinoua: please do not create multiple threads for the same question.

Member Avatar for Ezzaral
0
91
Member Avatar for MrHardRock
Member Avatar for liftthis

[B]> I only want to display a list of incoming string phonenumber[/B] JList will display the [ICODE]toString()[/ICODE] result of objects in the model, so you can override [ICODE]toString()[/ICODE] in your [ICODE]SmsMsg[/ICODE] class to display the phone number. As for double-clicking, you can retrieve the currently selected item with [ICODE]list.getSelectedValue()[/ICODE] and …

Member Avatar for Ezzaral
0
99
Member Avatar for exi

Open the [URL="http://download.oracle.com/javase/6/docs/api/java/io/FileWriter.html#FileWriter(java.io.File,%20boolean)"]FileWriter in append mode[/URL].

Member Avatar for exi
0
242
Member Avatar for debasisdas

Yeah, zoom is probably the culprit there. I leave my forum listing zoomed out one step and that shifts the community center link down to the second line.

Member Avatar for debasisdas
0
180
Member Avatar for newack

That's an applet. It doesn't need a main method. How are you trying to run it that you are getting that error?

Member Avatar for newack
0
214
Member Avatar for vmanes

[url]http://jitcrunch.cafepress.com/jitcrunch.aspx?bG9hZD1ibGFuayxibGFuazo1MF9GX28xLmpwZ3xsb2FkPUwwLGh0dHA6Ly9pbWFnZXMuY2FmZXByZXNzLmNvbS9pbWFnZS8xMDc0MTUxOV80MDB4NDAwLmpwZ3x8c2NhbGU9TDAsMzM4LDIwMCxXaGl0ZXxjb21wb3NlPWJsYW5rLEwwLEFkZCw3MiwxNDF8bG9hZD1tYXNrLGJsYW5rOjUwX0ZfbWFza19vMS5qcGd8Y29tcG9zZT1ibGFuayxtYXNrLE1hc2ssMCwwfGNwPXJlc3VsdCxibGFua3xzY2FsZT1yZXN1bHQsMCw0ODAsV2hpdGV8Y29tcHJlc3Npb249OTV8[/url]

Member Avatar for Lardmeister
0
600
Member Avatar for jmcorpse

The errors are pretty clear. You can't use the variables [ICODE]firstName[/ICODE] and [ICODE]lastName[/ICODE] in main() if you haven't declared them.

Member Avatar for jmcorpse
0
318

The End.