swing

loop through JPanel

Hi there, In order to initialise all JTextfFields on a JPanlel when users click a "clear button" I need to loop through the JPanel (instead of setting all individual field to ""). Can someone please show me how to use a For Each loop in order to iterate thru the JPanel in search of JTextFields. Very much appreciated Dallag. ...

Displaying entity-attribute-value data in JTable?

How can I use a JTable to display & edit attribute properties for entities retrieved from an entity,attribute,value (EAV) store (a relational DBMS)? I know this is a question with a lot of possible answers, so PLEASE look at the requirements I have below before answering. I promise to vote up answers that show you've read & understa...

Java GUI creation framework

Do you know any decent framework for creating Swing screens? I need to extend my application for implementors that will have to add their own screens. Possible options: Netbeans platform with Matisse editor Bean builder (very old and unsupported) Eclipse VEP (beta) Any other option? Update: I am not looking for design time tool t...

Swing application problem

I'm developing Swing application, and everything works fine usually. But I have an GUI issue. When I run the application, and for example minimize some other window, my application is still working, but the central part of JFrame is invisible or hidden. After finishing some part of program logic the GUI repaints and is visible again. ...

Are there any built-in methods in Java to increase Font size?

Are there any built-in methods in Java to increase Font size? ...

What method should I use for making my java GUI?

Hi all. I'm making a AWT GUI for a simulation game. I have only been working with java for 2 years, and so have limited experience with building more complex GUIs. I have done a few simple ones, hard coded, and tried jigloo in eclipse. I am thinking of using MIG Layout, although some say I should really try and use jigloo more, or anothe...

How can I display a bitmap image in a Java applet?

I am having a hard time figuring out how to show an Image (or ImageIcon) in a Java applet. The following is my code. The picture (test.bmp) does exist and is on the D drive but when I run this I get the applet window with nothing in it. Can somebody tell me what I am missing to make the ImageIcon show? public class Form1 extends JAppl...

Java JComboBox Custom Renderer and GTK

I have a list of Customer objects that I need to have selectable from a JComboBox. From what I read I need to implement a custom renderer to have the fields I want displayed in the list. I want my JComboBox to have entries formatted as such: +----------------------------------------------+ | Customer Name - Contact - City, State V...

Java Swing BasicUI update error, what can I do ?

My program uses Swing JPanel, JList, JScrollPane ... It runs fine, but generated the following error message, and yet in the message it didn't say which line of my program caused the error, what can I do ? ========================================================================= Exception in thread "AWT-EventQueue-0" java.lang.ArrayIn...

digital clock

any builtin classes available to display the digital clock in java?? ...

Get height of multi line text with fixed width to make dialog resize properly

I want to create a dialog that contains some kind of text element (JLabel/JTextArea etc) that is multi lined and wrap the words. I want the dialog to be of a fixed width but adapt the height depending on how big the text is. I have this code: import static javax.swing.GroupLayout.DEFAULT_SIZE; import java.awt.event.ActionEvent; import ...

Icons between text in a jlabel using graphics

Hi how to paint multiple icons (ie., say icons between text) in jlabel using graphics? plz do assist me in this effort Thanks ...

Swing: How could I get JInternalFrame treated equally to other components inside a container?

Hello! Background information: I am implementing a visual diagram editor, which consists of different complex elements (re-sizable, with title bar, sub-elements) and different simple elements (not re-sizable, no title bar, no sub-elements). All elements are draggable. I am using JInternalFrame (for complex elements) along with JPa...

How to show a textbox, button, etc in a Java Applet?

How can I show common GUI elements such as : Textbox Button Radios/Dropdowns Labels etc in a java applet which would be run from a web browser? ...

How to do file uploads via a Java applet?

Specifically how can I: Show a button which will let the user browse through his computer and select a file Show a progress bar as the files are uploaded And store the files to a location on the server of the website on which the applet is being run Any ideas? And yes, I must do this in an applet, and I will make it a trusted/signed ...

scrollbars in JTextArea

How do I add scrollbars to a JTextArea? ...

Swing: How to achieve forwarding of all events from subcomponents to parent container?

Hello! I'm looking for a straightforward way to make a Swing component forward all received events to its parent container (or even all parents up to root). EDIT: Where do I need this? I have a diagram editor. Components must forward key press and mouse clicks (to set themselves as "active" as soon as the user clicks a subelement of th...

How to change JTree view dynamically when a nodes object's state changes?

I'm implementing a Java JTree panel. This panel holds a TreeModel build from a set ofdatastructures that are treelike (a list of lists of composites - different classes). I get these datastructure from external jar implementations based on a set of interfaces I defined. The treenodes contain a checkbox that the user may check to indicat...

Java Swing GUIs on Mac OS X

Have you ever attempted using Swing only to end up changing courses because it just couldn't do what you wanted? I'm pretty new to Swing, having only used it for school projects over 5 years ago, but it seems Swing has come a long way in providing a more native look and feel, so much so that I'm considering using it to develop the GUI f...

css with swing

how to introduce CSS style for various swing components like JButton,Jpanel etc. in a swing application? ...