Questions tagged as 'swing'

1
answer

How do I get the name of a button in the MouseListener?

How do I get the name of a button in a class that implements the MouseListener: public class Viewer extends javax.swing.JFrame{ public Viewer() { initComponents(); } public void init(){ MouseListener ouvinte = new...
asked by 19.05.2014 / 01:11
1
answer

How to apply a filter of two JDateChooser to a JTable?

I need to simultaneously filter the data to be displayed in a JTable . Querying some old questions I was able to solve part of my problem. I have a DATA field in the table of type String and I have two JDateChooser of the JCalend...
asked by 08.11.2018 / 20:13
1
answer

Distribution of components in GroupLayout

The example below has a GroupLayout that contains two elements, a custom search and filter bar ( JPanelSearchAndFilter ) and a JScrollPane . When it is run and then the window is maximized you can see that these two element...
asked by 22.11.2018 / 13:41
1
answer

How to change border color and JFrame title in Java?

I would like to know how to change the border color and title of a JFrame in Java. I only found information on how to remove the border and title, but how to change the color does not. I'm currently using Eclipse.     
asked by 16.09.2018 / 04:49
1
answer

Problem in setListData

I made the example of the book "Java How to program". I'm having trouble with the copyJList.setListData (colorJList.getSelectedValue ()) line; Someone could help. package LvProg8.exercicio.capitulo14.exemp8; import javax.swing.*; impo...
asked by 30.04.2018 / 14:02
1
answer

Captures what the user types and writes to a .TXT

I made a program in JFrame, basically it captures what the user types and writes to a txt, but when I go to see the contents of the file is written, the following "null". What could be happening? importjava.io.BufferedWriter;importjava.io.Fi...
asked by 03.04.2018 / 20:33
1
answer

Display JTable in multiple panels

How do I get my JTable displayed on all tabs within the panels? I can only display on the "Day 5" tab. import java.awt.Container; import java.sql.ResultSet; import javax.swing.BorderFactory; import javax.swing.JButton; import javax.swin...
asked by 08.04.2018 / 19:10
1
answer

Delayed inter-screen application

When I change the screen, there is always a delay from one screen to another and this is annoying. You see clearly that one screen closes to open another. do you know that java symbol that stays when you open an application? Then when I open...
asked by 30.01.2018 / 21:17
1
answer

Creating row filter "dynamic"

I'm using RowFilter to create filters for certain columns in my table. My intention is to pass the components I want to use as a "bar" search by parsing, creating them dynamically, and in the same way apply filters to them, that correspon...
asked by 10.09.2017 / 18:06
1
answer

JSlider does not appear in JPanel after being inserted

I was trying to add JSlider to JPanel but it does not appear. Could you tell me where I'm wrong? import java.awt.Dimension; import javax.swing.BorderFactory; import javax.swing.JFrame; import javax.swing.JPanel; import javax.s...
asked by 08.09.2017 / 19:48