Questions tagged as 'java-swing'

1
answer

Efficiently closing a JFrame in Java

Good friends, I have a question for you. Does anyone know how to close a JFrame and in doing so release the memory that was used in that window? Pass the following, I have an application in which I log in and open a JFrame that acts as the main...
asked by 27.03.2017 / 23:23
1
answer

NullPointer when opening a window from another

I have two windows that I show you below: vistaAlbumesBuscar public class VistaAlbumesBuscar extends JFrame implements ActionListener{ /** * Componentes de la ventana */ private Coordinador miCoordinador; private JTextField campoT...
asked by 20.05.2016 / 21:29
2
answers

View Images saved on a remote server in a Java client

I have to create a Java application with a remote client-server graphical interface, which allows the client to view an image stored on a remote server (my pc), I do not want to save the image, just visualize it from a JPanel or something simila...
asked by 17.06.2016 / 16:57
1
answer

Save parameters of a method in a variable

I have the following code that is part of a class that handles the events of a frame : public void actionPerformed(ActionEvent ae) { if(ae.getSource()== NuevoEstudiante.btnGuardar){ String nombre= nuevoEstudiante.txtNombre.getText();...
asked by 07.09.2016 / 21:00
1
answer

Align the text / message of a JOptionPane

I have several JOptionPane that show messages, example: JOptionPane.showMessageDialog(loginFrame, " Login Successful"); When I write the message as in the example, I have to put a space before Login Successful so that it...
asked by 06.12.2018 / 09:19
1
answer

Collect the data entered in a single JOptionPane

I would like to know how I have to do to gather in a single JOptionPane all the values that I enter by keyboard and not one by one. I am starting to use the windows of the JOptionPane and I have not finished clarifying at all. Thanks! import...
asked by 24.11.2018 / 00:03
2
answers

File reading

I am trying to make a program that reads a text file, it must be printed on screen in some defined fields, I must configure a button of first, next, previous and last. I'm with the next but I try to do it through a cycle as if it were an array b...
asked by 21.11.2018 / 22:05
1
answer

Obtaining data from JCombobox

I'm generating a form where I need to get some value from a Jcombobox Currently, this is my code: private void llenarMatriz() { String cmb = "SELECT DISTINCT nombre_matriz FROM matriz ORDER BY nombre_matriz ASC"; try { Statem...
asked by 25.10.2018 / 16:11
1
answer

JTabbedPane Tabs are not visible

I am creating a JTabbedPane with several JPanels, but at the time of starting the program the 4 tabs are not shown, and I can not understand the reason. I hope someone can give me a hand to understand why. package View; import java.awt.Bor...
asked by 15.10.2018 / 21:38
1
answer

Help to understand the following method?

I have the following method in my program, and although I understand it a bit I can not capture its logic completely. I am a newbie with the programming of Java.Swing and NetBeans and I am learning alone but apparently the method is a bit comple...
asked by 08.07.2018 / 06:06