Questions tagged as 'swing'

1
answer

I would like to know how I use Swing [closed]

I'm learning Java Eclipse and would like to know how to use Swing. Do I need to install? How does it work?     
asked by 22.04.2015 / 03:00
1
answer

java.lang.NullPointerException in this code

This is giving java.lang.NullPointerException error in these two classes. import javax.swing.JButton; import javax.swing.JPanel; import javax.swing.JTextArea; import javax.swing.JTextField; public class PrimosPanel extends JPanel { priva...
asked by 09.12.2014 / 11:22
1
answer

How to get value from Form - Java - Swing

I created a form in Java with interface Swing , in this it has a field textfield Text and a button Send , in the code of the precise button to assign the value informado no textfield to a variable of type...
asked by 30.10.2015 / 13:49
1
answer

JLabel is not displayed

I created a label where it would contain the status of the connection process with the database, but it does not appear and I have no idea why this happens, since I have been looking at the code for three days and I do not know What happens, it...
asked by 28.11.2014 / 22:59
1
answer

Is there a function equivalent to drawPixel in Java?

I wanted to know if there is a function in java that plots a pixel, something like drawPixel or setPixel that I see in some other programming languages, where you inform as parameters the X and Y coordinates and the pixel color to be plotted . I...
asked by 10.03.2015 / 03:10
2
answers

Confirm form closure

I need to ask if I want to close the window that is open. I made the following form, but in any of the options, it closes. I currently use this event option: private void formWindowClosing(java.awt.event.WindowEvent evt) {...
asked by 26.03.2015 / 21:08
2
answers

Progress bar is not updated correctly

Working with progress bar ( JProgressBar ) I came across a problem with PropertyChangeListener . In fact, not necessarily in PropertyChangeListener , but rather at the moment of returning the property being updated. Tarefa ta...
asked by 30.01.2014 / 22:36
2
answers

Draw a pixel-by-pixel image

I'm trying to do a beast program but I can not do it. I want to redraw a pixel-by-pixel image randomly, doing this with multiple threads. I do not handle much of Java Swing, so I'm beating myself a lot. I did some research before postin...
asked by 09.10.2014 / 15:23
1
answer

Exception in Java UiThreadingViolationException

I have done a project with LookAndFeel Substance , in it I have a thread that is updating periodically a JProgressBar , the problem is that in the function JProgressBar.setValue(1) and JProgressBar.setMaximum(10)...
asked by 09.02.2015 / 19:05
2
answers

How to change the size of the rows of the vertical grid of a JTable?

How do I change the size of the vertical grid lines of a JTable? Ex: jTable.setRowHeight(30); This method changes the width of the line. Is there any other similar to this that changes the vertical grid width of the columns? Below...
asked by 10.05.2018 / 21:38