Questions tagged as 'swing'

2
answers

Add mm: ss of a column in jtable

Good afternoon, I know that the way I explain it is complicated to help me. I have a jTable that contains a column where times are shown, those times in mm: ss. I need to calculate the average between these times. I made several attempts with...
asked by 18.07.2016 / 20:55
1
answer

How to minimize Main frame when opening a new frame

I have a problem, I created a java application with a menu that calls several screens. When I opened some screen, I wanted my main application screen to be minimized. I tried with setvisible(false) but it did not work out as expected....
asked by 13.06.2016 / 16:54
1
answer

Click on the screen and change the values of the variables

I need to implement in the code functionalities so that when I click on the screen, I change the values of some variables that are in the code. However, when I click, it stays the same. My main class : /* * To change this license header,...
asked by 30.06.2016 / 15:33
1
answer

Start all CheckBoxes of a selected JTree

I would like to know how I could do to start the class already with all checkboxes checked, I found this class and I used: package CustonComponents; import java.awt.BorderLayout; import java.awt.Component; import java.awt.event.MouseEvent; im...
asked by 01.07.2016 / 16:21
1
answer

Text changes on label with switch

Do you know that initial Pokemon conversation?    "Welcome to the pokemon world" - ENTER   "Are you a girl or a boy?" -ENTER   CONTINUE .... So, I'm trying to do one through Java swing, at the moment it looks like this: private void j...
asked by 29.05.2016 / 02:12
1
answer

How to return the declaration of an attribute in a JLabel?

I'm a beginner in programming, my question is:   - I created a public static final double Preco_Gasolina = 3.85 attribute in a class A.  - I want to return the value of Preco_Gasolina = 3.85 in a JLabel in class B. This is po...
asked by 17.04.2016 / 22:53
1
answer

Execute an action when a button is clicked for the first time and another one otherwise

I would like to know how to do an if when the button is clicked. For example: private void btnEditarActionPerformed(java.awt.event.ActionEvent evt) { ProdutosDAO produtoDAO = new ProdutosDAO();...
asked by 07.07.2016 / 01:34
1
answer

Print ArrayList, Java Swing [closed]

I'm starting studies on Java applications with Swing, and I have questions about how to print my ArrayList. What is the best way to print or list an ArrayList within a window? In my case we have a calendar, we insert contacts into an Array...
asked by 13.11.2015 / 22:59
1
answer

JPanel disappearing while giving a get in it

I'm building a layer-based application using the Spring Framework, I'm newbie and well doing the wrong thing. My problem is as follows, as you can see in the image below I have PrincipalFrame and PessoaFrame > PessoaPanel...
asked by 11.09.2015 / 01:49
2
answers

(Business rule) - Repeated sign

How do I make this business rule that prevents the user from registering an account with the same number and same agency? Class main public class Main { public static void main(String[] args) { menu(); } public static ContaBancariaBean...
asked by 11.05.2015 / 17:33