Time for your 3rd Quarter Update! Are you in the running for the 6th Annual Expert Awards? Click the link to find out.

Third Quarter Hot Shots
 

Having problems asking a question? Have a general question about Experts Exchange? Let us know!

 
Time Tested AWT / Swing Solutions: 1 - 25 of 129
 
Hi I have a JFrame to which I am trying to add an image to it.  I'm to to this GUI stuff and I'm not sure how to do it.   I want to add the image to the JPanel (the blue area).  Can anyone hel...
hi, i have 3 classes in java. 1)a class that extends Jframe 2)another that extends JPanel 3)a class that holds only the main method In my main method of my 3rd class, it looks something ...
How do I get a row in JTable selected when user clicks on first column in that row? Rest of the time I want user to be able to block individual or group of cells so I have: myTable.setSe...
Hi Experts, I have JTable with 5 columns and one column with check box vales. I need to select one row at a time and fire event on selection of cells in first 4 columns. But the last check ...
I'm working on a JTable using a custom table model. The data source for the table model will sometimes change number of columns. If number of rows change, it will be updated, but not columns. ...
resizing image with getScaledInstance I have a great quality loss. I read also  http://today.java.net/pub/a/today/2007/04/03/perils-of-image-getscaledinstance.html but i was not able to ob...
I making my own JDialog class, because I want the buttons a certain way. I've got something that works, but it seems inelegant. Two classes here: ThreeButtonDialog and ButtonPanel (ignore Te...
Hi, I just cant get this to work. I'm trying to add components to a JPanel called "hoyre_jpanel" as showed in the code. I've tryed using borderlayout, without borderlayout, validate, repain...
For some reason I can't make the JTextFields fire the property change events when changing the text in the textfields. I followed a guide used on JFormattedTextField on sun.com, but maybe its ...
I'm stuck. I have a JTable that holds a JComboBox which is populated depending on the value in another cell (plain) in the same row. Everything displays correctly, with the correct values in e...
I have JTextPane with HTML like this pane.setContentType("text/html"); try {      StyledDocument doc = (StyledDocument)pane.getDocument();      Style style = doc.addStyle("StyleName", null);      ...
I am trying to check my code into SVN using eclipse and I am getting the following error message. I did 'update' before issuing commit. update C:/Documents and Settings/436447/workspace/com...
Hi all, i'm using netbeans to create an application, and use the "design" view to add swing elements. When i add the file chooser, i get this large filechooser frame in my application. what...
I've got this custom dialog that displays, calling it like so: ThreeButtonDialog applyDialog = new ThreeButtonDialog (frame, "myTitle", message, options, null); How do I get the informat...
I found the listed program on Roseindia.net.  Great site I recommend it.  Here is the code: import javax.swing.*; import java.awt.event.*; public class ShowDialogBox{   JFrame frame; ...
I'm trying to create a data file viewer with an application I'm writing. It works the first time, but if you try to press the button again and change the source file and view another data file...
hi experts i have a Form contain a JTable that retrieve   the data from the database when this form be loaded , and fill the JTable , in this form also i have a "ADD" button when you press th...
hi, i've searced the web to find a way to set padding on a JPanel, like padding is used in css. But i couldn't find any. How would i set padding on a jpanel? Stian
I need some assistance returning the query I wrote into a JList.  A worthy example might be enough for me to get the task done. The code below compiles and connects to the database, so the ...
I have a JPanel to which I need to add three buttons.  I use a border layout and I need to fit the three components in these regions: NORTH, WEST, EAST. My problem is that when I add the WE...
I am making a game in java I'd like small animated GIF's to appear at certain x,y co-ords on my jframe. In the paint method, how do I get the anim gif moving?
I am adding a small piece of code onto a large project that's already in place.  It's written in Java.  The new code displays 3 panels on a frame and then an image.  The user can make a selec...
Hi experts, I am developing a stand alone java application using swing. I am new to swing. As per the need i have to put a JTable in my application and make that JTable editable. That is on cl...
Hi. This is a newbie question. I have a simple Java program with Swing. An extract: listData = new Vector(); listData.add("Hello there"); listData.add("hihi"); listbox1 = new JList( lis...
Hi, I am developing a swing application and I need to change the java icon on top left of frame and put my organasation's icon(image.ico) there. How could I do that? I have set look and fee...