Questions tagged as 'java-swing'

1
answer

How do I change the text of my jlabel of a Jframe according to the button I press from another jframe? [closed]

Good morning, I would like someone to help me with this ... it's something simple and maybe even laugh XD But anyway... I have 5 buttons in JFrame, each contains one of the 5 vowels text ... what I want is that when I press any of them, I open a...
asked by 24.11.2017 / 07:42
1
answer

how to make a label follow the pointer, within a frame with a mouse event?

I have tried again and again to move a jlabel to the position where the pointer is located. for this I have captured the coordinates of the pointer and I have assigned them to my label. private void jPanel1MouseMoved(java.awt.event.MouseEv...
asked by 21.11.2017 / 23:57
1
answer

How to save an image in SQLServer 2014 from Java using JPA?

I am trying to save an image that is selected from a user interface using the following code: private void botonSeleccionarActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your...
asked by 26.11.2017 / 18:12
2
answers

How to move a Boolean variable created in a Jframe and be able to use it in a different Jframe?

My problem is that I have this in a Jframe The idea is that the user write 2 propositions (can be true or false) to be able to make operations with these private void jButton1MouseClicked(java.awt.event.MouseEvent evt) {...
asked by 18.11.2017 / 04:02
0
answers

I do not work the if else in java swing jbutton

Good thing I'm doing a program with java swing. It involves loading in a 266 arraylist questions from a file.txt. In another arraylist I have the 266 answer that I also load it with another file.txt. I have a textfield that the user must ente...
asked by 01.10.2017 / 16:05
0
answers

Problem with JPanel in Java Swing

Hello, how are you? I'm new to the community. I come to consult you about a problem that I have with Java Swing. The issue is, in short, that I have a JFrame to which I set an empty JPanel, something like this: principal = new JPanel (); get...
asked by 24.09.2017 / 08:20
1
answer

Capture the text of JTextField - it does not work

I am learning this wonderful and complex language. Following a video course (from youtube) in which is the following exercise: /* * To change this license header, choose License Headers in Project Properties. * To change this template file,...
asked by 22.09.2017 / 01:43
1
answer

java Gui is blocked, serial communication - graphic jfreechart

I have a problem with the GUI that freezes, in my application I use the library rxtx 2.1-7 and the library jfreechart 1.0.19. Basically communication is established and port events are read when receiving data. the data is added to a list and th...
asked by 27.09.2017 / 20:56
1
answer

JButton to connect to a BD

JButton Conectar = new JButton("Conectar"); in my main class. I would like that button to execute another class that I have in the package. SaveDB inside contains the Connection method. I tried this but it does not work. GuardarDB d...
asked by 25.09.2017 / 04:49
1
answer

Null Pointer Exception when loading a JTextField

I have my Auto class public class Auto { int id_auto; String modelo; String color; int anio; String marca; public int getId_auto() { return id_auto; } public String getModelo() { return modelo...
asked by 20.09.2017 / 01:20