swing

Need help with Layouts in Swing

Hi, I'm using Java Swing and I have the following problem: I have a class TnaiPanel that extends JPanel. In this class I am creating 3 components and then lay them out in a horizontal line using a BoxLayout. Also, I have a class TnaimDinamimPanel that also extends JPanel. This class contains multiple occurances of TnaiPanel, layed out...

Supported Layout Managers in Eclipse Visual Editor

I'm evaluating GUI builder tools for Swing. In the Eclipse Visual Editor 1.4 the list of the (natively) supported layout managers seems a bit short to me. Still no support for FormsLayout or TableLayout? The official documentation is a bit vague on the issue. ...

How to store and retrieve object of a swing component in database, java

Hi I have written a small java program based on swing application. Now I want to store the object of my swing application (jframe) in database and I want to retrieve the same from database when its necessary. during retrieve i want to get the same object. I am using sqlite as database How to achieve this functionality Thanks Sunil Kuma...

Swing's KeyListener and multiple keys pressed at the same time.

Hi everyone, is there any conventional way in swing of tracking down the events, when two keyboard keys are pressed at the same time? I have a couple of ideas e.g. remembering the key and event generation time so that we could in a consecutive event handler invocation check the time difference between these two events and decide, whethe...

Need Java Swing HTML canvas with support for integrated swing controls

I would like to create an application in swing in the style of web 2.0 but have the power and functionality of a thick client. I know substance and some other look and feels help with this some, but I was wondering if there is a way I can actually use some kind of html panel / canvas to create the content in html, embedding swing control...

Can you suggest me a fast Swing IDE

Hi, Currently I am using Netbeans to develop applications in Swing, but Netbeans is very very slow. Can anyone suggest me a comprehensive Swing development GUI like Netbeans but lightweight Thanks ...

Using AWT components inside a JInnerFrame (for JDesktopPane)

Hello, is there a way to hack bugs related to adding an AWT component (in my case a PApplet, so a processing language sketch) inside a JInternalFrame? It works but not as intended, since it flickers and dragging the frame causes repaint issues.. reading around it seems that, althrough it's possible to mix heavyweight (AWT) and lightweig...

Adding a JTable to a layeredPane

Can we add a JTable to a JLayeredPane in Java? ...

how to remove MouseListener / ActionListener on a JTextField

Hello everyone, I have the following code adding an ActionListener to a JTextField: chatInput.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { chatInputMouseClicked(evt); } }); Now how do I remove this MouseListener using chatInput.removeMouseListener(), sin...

How to use Guice in Swing application

I have a Swing application that I would like to convert from spaghetti to using dependency injection with Guice. Using Guice to provide services like configuration and task queues is going great but I'm now starting on the GUI of the app and am unsure of how to proceed. The application is basically a JFrame with a bunch of tabs in a JTa...

How do I determine if a JDialog has children?

I've got a custom window class that is a couple levels down extending a JDialog. We have windows that we create and sometimes we create new windows as children of existing windows using the constructor that takes a parent argument. I need to put some code somewhere in our custom class that does something different depending on whether ...

Avoiding unnecessary events and infinite loop in "coupled" JSliders?

I have a GUI that is issuing commands to a web server based on slider values. Some of these sliders are "coupled" on the web server, so changing one of them may also change another one. The coupling is accomplished by the web server returning a list of the values that were set based on the the issued command. So I can easily set the app...

adding jpanel into a jframe. netbeans

i am particularly using netbeans gui editor and i am new to gui i have a jframe created and I added jtabbedpanel. inside the jtabbedpanel i have 2 panels that i call standard and compact i have set standardPanel = new ImagePanel(); which ImagePanel.java is located on different java file how am I suppose to put a panel on different...

Where does the little triangle icon of sortable JTable header come from?

I am writting a customized component which need to use the little triangle icon of sortable JTable header. Maybe it's not really an icon file but a graphics painted by some class. ...

Over ride default look and feel Java

I want to over ride java look and feel. I just want to show the buttons differently. I want all the features of Windows Look and Feel but only buttons differently. I hope you get my point. Color color = new Color(220, 220, 220, 200); UIManager.put("OptionPane.background", color); UIManager.put("Panel.background", color);...

the relationship between evet listener and event source in Java

hi everyone what is the relationship between evet listener and event source in Java ? and i have another question what is the difference between java application and java applet ? any help thanks in advance ...

How to maximize java swing application

Hi All, I have created a login page using java swing. and i created jar for the application. Now when I run the jar then my login page is displayed then i minimize the application and again run the jar then another instance of my application is displayed (means now in my system I have two login page. 1 is in minimized format an...

Java beans binding: adapters?

Here's a really simple class: static public class Bean1 { final private String name; final private Bean1 parent; private int favoriteNumber; public String getName() { return this.name; } public Bean getParent() { return this.parent; } public int getFavoriteNumber() { return this.favoriteNumber; } public void...

Java Pack No Resize

i am learning Java at the moment and have the following question: i am adding my controls to JFrame and then pack() before displaying. this runs the application and all is very nice. i was wondering is there a way to stop the user from resizing the application window? also is there a way to for the image in JLabel to expand as the us...

JButtons re-enable themselves after being disabled

I have an array of JButtons which form a keypad interface. After six numbers are entered I want to disable the keypad so that no further numbers can be entered by the user. I have written the code and the buttons do disable until the mouse hovers above any of them, then the buttons seem to re-enable themselves and run actionEvents added...