Questions tagged as 'swing'

1
answer

How popular is a JTable using a .txt file?

I would like to know how to make a JTable popular using a pre-existing text file. IhaveaquerytableandIwanttheusertoputtheaccountnumber,itshowsthedatainJtableandalsohowcanIdothefilteringbytheagencynumber?Thedatafrommytextfile: link...
asked by 03.05.2015 / 03:44
1
answer

Rename an element in a JList

Greetings, friends. I have a problem with Java. I'mtryingtoaddanelementoftype"Occurrence" in a JList. This element has 4 elements inside it, which I need to keep. So far so good. However, the problem appears when I add that element to...
asked by 23.11.2015 / 17:19
1
answer

How to add values in the JTextField via the button without deleting the previous value?

My problem is that I placed a button so that when it was clicked, I would add the value 1 to JTextField . But when I click again, it replaces the value, and what I wanted was for it to add another type 1 , I click once on t...
asked by 01.01.2017 / 21:39
1
answer

How to open JInternalFrame window after login?

I'm new to desktop java and am doing a program with swing , and would like to know how to JInternalFrame open after login is done, follow the code for analysis. if(usuarioText.getText().equals(objConexao.rs.getString("nome"))...
asked by 13.12.2015 / 16:00
1
answer

Background in JDesktopPane without losing quality and expandable

I have code to add a background image to a JDesktopPane and it works perfectly on 16:10 widescreen screens. However, when the screen is a bit wider (16: 9), it does not fill the rest of the background. I've seen some other possible ways t...
asked by 16.05.2017 / 14:56
1
answer

Change text in a JTextArea at runtime

Good morning everyone, I have a backup routine that should write the result to a JTextArea , at runtime. The copy works, the problem is that the window containing JTextArea gets stuck and does not append the text every time a...
asked by 10.11.2015 / 13:22
1
answer

How do I set a char in a PreparedStatement?

My FuelType variable is a char how to set this in the PreparedStatement? PreparedStatement ps = conexao.prepareStatement(sql); ps.setString(1, veiculo.getTipoCombustivel());     
asked by 02.06.2015 / 19:18
1
answer

How to change the font color of a JTextArea?

Throughout the internet I just found people wanting to know how to style part of the text and being "redirected" to JTextPane , so there are no answers to my question out there. So there goes: I have a JTextArea in a JFrame...
asked by 17.10.2014 / 15:52
1
answer

Java interface layout

I'm developing a program for a friend and I'm using the Java language for this. I'm using the Netbeans IDE which has the feature of building the user interface (UI) by drag n 'drop, using Swing. I have a lot of trouble building UI, I'm pretty...
asked by 14.10.2014 / 21:36
1
answer

Difference between methods to close JFrame and JDialog after keyboard event

I need to deploy to a desktop application built using swing , a way for the JFrame master to close the application when the user clicks ESC , and the JDialogs daughters of this%
asked by 17.02.2016 / 17:09