Questions tagged as 'swing'

0
answers

Set JDialog width according to the size of the column sums of a table

I have the sum of the width of the columns and I need to set this value so that it does not hide parts of the columns and decrease the window. Any suggestion?  I created a method that returns the sum of the size of the columns.  Then I made anot...
asked by 06.07.2015 / 15:47
0
answers

How to display data dynamically in JInternalFrame?

I'm making a small betting software and I'm completely lost in being able to allocate data dynamically on my interface so that for every entry in the database a structure with a JPanel is displayed that will have components inside it and...
asked by 22.09.2015 / 00:55
1
answer

Custom JCheckBox does not appear

I would like to display a% cos_de% larger than normal by interface standard. After some searches I found the Customize JCheckBox icons an example to use, but it does not changes the size of the JCheckBox, but instead replaces its default image...
asked by 16.07.2015 / 06:20
1
answer

How to maintain the layout of components created by WindowBuilder in eclipse after compilation?

I created a JFrame using the Eclipse WindowBuilder plugin. Spacings, sizes and patterns were defined. However when compiling the project the standards are lost. Below the 2 photos for comparison. Here is the JFrame Preview. JFrameaftercomp...
asked by 25.03.2015 / 13:20
1
answer

How to get the color of a pixel on the screen in JAVA 2D game?

Is there any way to get the color of a pixel at the x and y coordinates of the screen that I specify?     
asked by 15.06.2014 / 00:05
2
answers

How to position the cursor at the beginning of the field?

How can I make a component ( JTextField , JFormattedTextField and others) when clicked / gain focus, position the cursor in the 0 position of the component, especially when the component is already filled and the user clicks...
asked by 16.06.2017 / 17:00
1
answer

Look and Feel in java

I have an application that uses Windows Look and Feel. But I have a problem where the user can have a Windows XP computer, and everything is stylized with windows XP. It has the application to stick with the compilation look and feel (or some...
asked by 23.05.2018 / 15:28
3
answers

Error in Java - Calculation of the square root

I was doing some basic exercises in Java and one of them asked:    In this example, we will use the sqrt method of the Math class to extract the square root of the number that is typed into a text box, a 'Text field' component f...
asked by 08.06.2017 / 15:52
1
answer

How to resize the monitor application?

I have an application that opens a JFrame , having at the top a JMenuBar . Until I call a MenuBar item a JTabbedPane is hidden and as soon as a menu item is chosen, a Tabbed with jPanel is opened. In this jPanel I have s...
asked by 22.03.2017 / 13:03
1
answer

How to retrieve index of combobox from a string?

I have the String for a combobox item, but when the user clicks the table, the combobox must automatically select the category of that certain item. However, I came across that there is no getIndex function as I put below. How can I retrieve the...
asked by 12.10.2017 / 21:12