Category "swing"

Why does this GridBagLayout not appear as planned?

I was trying to achieve the end result required in Setting an arbitrary width in GridBagLayout. For easy reference, here it is: This is the current result:

Pagination in JTable with row sorting

I have implemented pagination in JTable, in that there is row sorting as well. My problem comes when I click on the column header for sorting it sorts the curre

Switching between screens in Java swing

I had build big application for my client in Android. The new project is to build the same app for PC in Java. So i have started developing with use of swing.

Drag and Resize undecorated JFrame

Currently, I am using the following code to drag and move my undecordated JFrames. private void initialiseGUI(Component component){ //<editor-fold defau

JSVGCanvas svg is blurry

I have pretty much copy pasted the code from http://people.apache.org/~clay/batik/svgcanvas.html but the svg that is outputing is blurry. I have used both a fon

jTable saving each row element in the new line in the .txt file

I have a problem with saving the jTable contents to a file. Every row data printed to file makes a new line along. So reading from .txt looks like this: Here

How to put Hover effect on jbutton?

I am trying to create a Java Desktop application where I am using two buttons. I want to add hover effect in those buttons. I want: When I click any button it s

Java Graphics, Graphics panel and Buttons Panel

I am trying to create a Frame that has a graphics panel on the top portion (through a Layout) and a buttons / labels panel underneath it in the same frame. So

Rotating BufferedImage instances

I am having trouble getting a rotated BufferedImage to display. I think the rotation is working just fine, but I can't actually draw it to the screen. My code:

How to validate Hour and Minutes that came from a Swing textBox?

I have a window that contains a HH:mm time TextField in it, in 24 hours format I need to validate if the user entered any non valid hour, like 28:00, 99:00, 24

How to validate Hour and Minutes that came from a Swing textBox?

I have a window that contains a HH:mm time TextField in it, in 24 hours format I need to validate if the user entered any non valid hour, like 28:00, 99:00, 24

How to remove auto generated code from Netbeans

Whenever I create new JPanelForm, NetBeans will create some auto generated code in initComponents() method. How can I remove this auto generated code from my JP

How to make JTextField lose its focus?

Exacly as stated in the subject how to make JTextField lose its focus? Something like: jtf.setFocus(false)

Editable JComboBox: Determining whether enter is pressed while ignoring it in drop down selection?

I have a panel with a couple of text fields and an editable JComboBox used to perform a search. I want all of these to act as if I press the search button under

Make a JFormattedTextField behave like ATM input

I would like to know if there is anyway to make a JformattedTextField or jtextField behave like an atm money input. With that I mean you enter from the right to

GridLayout with component fixed Width and Height?

I have a main Panel and I'm adding components dynamically into that one. Main Panel has GridLayout limited to 3 columns and 0 rows (0 rows will allow rows to gr

GridLayout with component fixed Width and Height?

I have a main Panel and I'm adding components dynamically into that one. Main Panel has GridLayout limited to 3 columns and 0 rows (0 rows will allow rows to gr

GridLayout with component fixed Width and Height?

I have a main Panel and I'm adding components dynamically into that one. Main Panel has GridLayout limited to 3 columns and 0 rows (0 rows will allow rows to gr