Questions tagged as 'swing'

0
answers

Error NullPointerException [closed]

I have a program that performs biometric authentication in two versions: 1) The user selects the binary file via javax.swing as follows: public class Busca extends javax.swing.JFrame { ... java.io.FileInputStream fis = null; fi...
asked by 04.05.2015 / 18:12
0
answers

eclipse connection to the database [closed]

btnLogIn.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { try { Connection lig = DriverManager.getConnection( "jdbc:mysql://localhost/gym", "root", ""); Prep...
asked by 18.05.2015 / 10:57
0
answers

Java application app [closed]

This code when pressed on the definicoes button opens a new window with an image, a line with text and also generates radio buttons, but the problem is that it creates another new window with the radio buttons and also doubles the JFra...
asked by 16.04.2015 / 14:06
0
answers

Pause Cycle to Jframe close [closed]

I'm going through a cycle with values, and at each iteration I call a Jframe to choose certain values, what happens is that all Jframes are opened without being able to complete the operation before. In my code the "fetchEditor" calls the JFrame...
asked by 03.11.2014 / 17:19
1
answer

Java BounceBall Bubble Movement - Error

I'm doing a BounceBall game, using iteration with the mouse pointer. But I came across a problem that I can not solve. The general idea is that the bubbles move around the screen, and when they find the mouse pointer, they change direction. B...
asked by 16.09.2014 / 19:32
1
answer

Draw a line on JLabel and JPanel [closed]

I'm finishing a game of the old woman, and I would like that when someone wins the game, a line is drawn on the line, column or diagonal, on which the game was completed. I'll post my code below: This is the class of the game, where it define...
asked by 27.06.2014 / 15:20
2
answers

NullPointerException error, where is the error?

I wanted to know where the error is. I read that the NullPointerException error is when we try to access a variable that was not initialized, I just did not find this error in my code. import java.sql.Connection; import java.sql.DriverM...
asked by 29.07.2016 / 21:45
2
answers

MaskFormatter leaving empty space

In my project, I have an age field, where I want to receive a maximum of 3 numbers, so I did this: mskIdade = new MaskFormatter("###"); So far so good, but every time I type a number with less than 3 characters, mskIdade fills in the...
asked by 07.06.2016 / 22:33
2
answers

How do I prevent the object from exceeding the screen boundaries?

I started programming a little game where an object moves across the screen through the arrow keys. The difficulty I encountered is that the object exceeds JFrame , that is, there is nothing to block the passage at the limit of JFrame...
asked by 06.05.2018 / 17:28
2
answers

What does this snippet mean?

Recently I came across a stone in the shoe, I was going to comment on a code, but I realized that I was filling sausage by commenting it, because I do not know what the actual use of the code is: Toolkit tk = Toolkit.getDefaultToolkit(); Dimens...
asked by 18.04.2017 / 03:52