Results for the jlistAlignment of JList and JComboBox -I would like to know how to set the horizontal alignment of JList's and JComboBox's. I've searched google but can't find anything. If you know how to do this please let me know. NOTE: I tried this on the JList but it had no effect: Code: JList.setAlignmentX(JList.CENTE jList - For the love of sweet jesus I have spent the last hour trying to figure out how to add strings to a jList from a button. How can I do this? Lets say I want to add "A" "B" "C" "D" to jList1 which has already been drawn on the form. Thanks jList -> get first element - How can I get the first element in my jList? Need applet help.. - Here is the thing i want to do. open an applet - load a text file into a Jlist. The text file will contain html web site links. The applet has to go open all the links inside the list and wait 30 seconds or so between each web page surf. I know how to load a txt file and get a l Need help with GUI's and JLists.... - I am working on an assignment for my advanced Java class. We are doing JLists for GUI's. I am not that good with GUIs, and I am having problems with valueChanged() method. I havent worked much with JLists before, so i am very new with them. I am getting the error, inconvertible typ "Invalid index" on JFileChooser - I have no idea why this problem is happening, but whenever I try the following code: Code: jFileOpenProject.setCurrentDirectory(myFile); where jFileOpenProject is a JFileChooser and myFile is a File object pointing to a directory. I get the following: Quote: Accessing anther class components - I have two classes how can I use the JList from another class each class has its file ?? Please help me fix the problem. - Hi. I use the constructor to get the information from the database, but it doesn't complie. Here is my code for the constructor. ============================================= public getData() { Connection c = DriverManager.getConnection_("jdbcdbc:GradeData"); Resul Threading In Java - How can I thread in java? In vb you can use application.DoEvents and that way your application doesnt freeze when its doing something. How can I do this with Java? To make things clearer, this is what Im doing. I am simply opening a file and adding each line into a DefaultListMode does this compile on your machine - I have this simple code with what I think is no flaws, but yet it won't compile. I think it's just my compiler being gay again, but I wanted to see if you guys could compile it. Code: import javax.swing.*; import java.awt.*; import java.awt.event.*; public class CurrencyC Setting up a JScrollPane - Im trying to create a JScrollPane that contains a JList which is populated with entries which are just Strings. For some reason i get nothing visually at all. When i set the JScrollPane to use scrollbars all of the time what is the default size of the JScrollPane? Code: public Difficulty grabbing info from a JList. - Hi everyone, this is my first post here! I have a JListBox which is getting its contents from an Array (containing names of months.) I need to produce an IF statement to determine how many days there are in a month, for example, I need to say something like : If (contents of s Dynamic Website Need suggestions! - I am looking to make a site for a friend who runs a movie company. Ive done a little html in the past but one of my other friends is going to take care of that since hes into PhotoShop and stuff like that. Anyway since i have never designed anything for the web i am a bit confused as t |