3,927 Posted Topics
Re: ... we now return you to your regularly scheduled reality. | |
Re: 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]. | |
Re: 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) | |
Re: 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. | |
Re: 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. | |
Re: [B]>so please give me suggestion as soon as possible [/B] My suggestion: Get started. | |
Re: 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 … | |
Re: 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]. | |
Re: 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 … | |
Re: This may be helpful: [url]http://www-personal.umich.edu/~lsiden/tutorials/signed-applet/signed-applet.html[/url] | |
Re: 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 … | |
Re: 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]. | |
Re: Move your declaration of [iCODE]ArrayList<String> studentArray[/iCODE] up to the class level, instead of within your readFile() method. | |
Re: 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. | |
Re: 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. | |
Re: 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 … | |
Re: 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. | |
Re: [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] | |
Re: [ICODE]Dispose()[/ICODE] the frame you want to close and [ICODE]setVisible()[/ICODE] the one you want to open. | |
Re: 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, … | |
Re: 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 | |
Re: 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 … | |
Re: 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 … | |
Re: 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. | |
Re: Nice to see people even welcome the members who have already gotten themselves banned ;) | |
Re: Be sure that you have specified the main-class attribute in your manifest file. | |
Re: 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. | |
Re: 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. | |
Re: 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. | |
Re: This post was just copied and pasted here for spam purposes. Closing, but leaving intact to preserve the effort of those who answered. | |
Re: 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. | |
Re: This may work for you. Assuming [ICODE]textPane[/ICODE] on a [ICODE]panel[/ICODE][CODE]SwingUtilities.convertPoint(textPane, textPane.getCaret().getMagicCaretPosition(), panel)[/CODE] | |
Re: I would have to disagree with AD there. That seems to be a guaranteed recipe for derailing other people's threads. | |
Re: You do realize you are potentially reassigning the value of [iCODE]a[/iCODE] many times, right? | |
Re: 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. | |
Re: 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 … | |
Re: I don't know where to start either because that has to be the poorest written assignment I have ever seen. | |
Re: Do you think people here can read your mind or see over your shoulder? Post your code and the stack trace. | |
Re: 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. | |
Re: 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. | |
Re: Merged duplicate threads. @casinoua: please do not create multiple threads for the same question. | |
Re: [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 … | |
Re: 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]. | |
Re: 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. | |
Re: That's an applet. It doesn't need a main method. How are you trying to run it that you are getting that error? | |
Re: [url]http://jitcrunch.cafepress.com/jitcrunch.aspx?bG9hZD1ibGFuayxibGFuazo1MF9GX28xLmpwZ3xsb2FkPUwwLGh0dHA6Ly9pbWFnZXMuY2FmZXByZXNzLmNvbS9pbWFnZS8xMDc0MTUxOV80MDB4NDAwLmpwZ3x8c2NhbGU9TDAsMzM4LDIwMCxXaGl0ZXxjb21wb3NlPWJsYW5rLEwwLEFkZCw3MiwxNDF8bG9hZD1tYXNrLGJsYW5rOjUwX0ZfbWFza19vMS5qcGd8Y29tcG9zZT1ibGFuayxtYXNrLE1hc2ssMCwwfGNwPXJlc3VsdCxibGFua3xzY2FsZT1yZXN1bHQsMCw0ODAsV2hpdGV8Y29tcHJlc3Npb249OTV8[/url] | |
Re: 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. |
The End.