swing

What is the name of the design pattern used in AWT/Swing that handles events?

I have heard that there are 2 ways that we can set the PLAF in Swing. What is the real meaning of PLAF, and what are those 2 ways? ...

Is there any way to accept only numeric values in a JTextField?

Is there any way to accept only numeric values in a JTextField? Is there any special method for this? ...

what does frame.setLayout(null)do?(frame is a JFrame)

I have seen this in a slide but I couldn't get that when and why we use this? ...

The super class of all event classes

I can not get that that super class is AWTEvent class or EventObject? ...

Why won't this Swing tabbed pane display?

Hi all, Could someone explain what I am doing wrong with my classes that my JTabbedPane doesn't display when the JFrame.setvisible is set to true? Yes, the main method of the program (which I won't put here) uses the event dispatching thread to initiate ArionGUI. Here is my code for the JFrame: import javax.swing.*; public class ...

JTable RowFilter

Is is possible to some how get the index of the selection corresponding to the non filtered table? After the table is filter using a regexFilter. JTable getSelectedRow returns the index of the filtered table? ...

JavaFX or Swing?

Hello, i just wanted your input on something with regards to java. Would it be good to use javafx for my user interface, or would sticking to swing be easier or more convenient? I'm still a student by the way, so i'm not really thinking in terms of the enterprise yet. ...

Java OS X Dock Menu

Is it possible to add items to the applications dock menu? EDIT: I think i miss phrased the question, i am not looking for a way to add an icon to the dock. what i am looking for is, when you right click on the itunes icon you get itunes control on the menu (play pause etc) i was wondering how can i add custom items to that menu. ...

Why is JFormattedTextField evil?

Hi, In this question Is there any way to accept only numeric values in a JTextField? one of the answers suggested that JFormattedTextField had issues. I've not yet used it, but could somebody please expand (or disagree) on the issues with this class? Thanks... ...

Free Java Swing calendar component for date picking

I need to add ability to pick a date in my Swing application. Picking should be similar to JComboBox, but instead of drop down list I would like to obtain one month with dates and ability to scroll between months. There is no such component in JDK. A list with a lot of third party components is available at http://www.java2s.com/Produc...

Link between two JFrames...

link between two JFrame using JMenu i have an application where i have to move to another frame by clicking a menu. for example, on a file menu, i click on add which will bring out a new frame where operations can be carried out. what code(s) can i use in Netbeans? i used it to open another jframe but when i exit the new jframe both fra...

Java document state pattern?

Hi, I am a new to programming with Java and I would like to know if there is some common practice for managing state of opened document (is current state saved or dirty) , saving document, opening, creating new document and so on. How do you approach this? Right now I have my little Swing application and have actions for opening and cl...

Designing simple cell renderer for Nimbus look and feel

I have a simple-ish cell renderer which is composed of a few JLabels (the renderer itself extends JPanel) and I'm trying to get it to render sensibly in the Nimbus look and feel. Basically what is happening is that in the lighter rows (as Nimbus has alternate row coloring), my specific cell renderer is using the table background color (...

JComboBox With Larger Drop Down Width

The problem: I have a combo box that needs to fit into a fixed space as part of a Swing application. However, its contents may be quite long. I'd like the box itself to be a fixed size, truncating contents. When the down arrow is clicked, though, I'd like it to act similar to an HTML select and show a box that is long enough to fit th...

Managing Swing Actions with a Registry

Typically when I'm creating a Swing (or any UI) application, I have various Actions that appear on menu items and buttons. I usually create an action registry and store the actions in there and then when certain things occur, I disable/enable actions in the registry based on the state of the application. I wouldn't call myself an avid Sw...

How can I open a web-page from my applet?

I have to open a page from class extended from javax.swing.AbstractAction class... Is that possible? ...

Strange blinking of cell on selection with custom Cell Editor

Hi. I am new to working with JTables and having trouble with getting my custom JTable editor to work properly. I have a number of custom panels with lists and buttons. To renderder them in a cell I am using a custom PanelCellRenderer that has various constructors for each type of the panel. To make the buttons clickable I have created...

Overlay multiple JSliders in Swing

Is it possible to overlay multiple JSliders so I can see the "thumbs" on both (I've tried disabling the painting of the track and setting opacity to false but one still hides the other)? Basically I'd like to create a component that allows the user to define a range (and I didn't really want to write a custom one since it has most of the...

How to mix java swing and java fx in swing application?

i am developing a java swing application but i want to also use java fx with swing is there any resource for that told how to do that? ...

What are good Java date-chooser Swing GUI widgets?

What are good Java Swing date-chooser components? So far I've only really found these 2: JCalendar - this one is pretty good as it uses the underlying look and feel. JXMonthView in the swingx project - not so good as it uses its own look and feel Both of these look a bit clunky when compared with some I've seen on web-pages. For exam...