Questions tagged as 'swing'

0
answers

How to leave a specific character underlined in a JTextField

How to change, say, the Font of one or more characters of a JTextField allowing them to be underlined, bold, or italic? But the rest of the text would be normal. But in this case I specifically need to underline some characters of a JT...
asked by 19.11.2016 / 17:35
0
answers

Is there any equivalent of RecyclerView in Swing?

In Android Studio, I use a class called RecyclerView , which repeats a layout as long as there is data for it, just like a list. Is there any alternative to this in Java using Swing?     
asked by 19.11.2016 / 20:48
0
answers

Remove file from a JList and computer [closed]

I have a frame with a list of values where multiple files are displayed. AtthispointI'mdoingthedeletebuttonsentinel(lastpartcode),inwhichthegoalistodeletethefilefromthedisk,andthejlist.publicvoidaddContentFrame(){frame.setLayout(newBorderLay...
asked by 18.10.2016 / 16:07
0
answers

How to use setCaretPosition in JFormattedTextField?

I'm having trouble setting the cursor at the beginning of the field, using the setCaretPosition (0); in the TextField fields, it works correctly, however, in any field with masks (of type JFormattedTextField ), it does not work. Can anyone...
asked by 07.11.2016 / 13:31
1
answer

How to call a class through another class using JMenuItem? [closed]

I have two classes in the same package, one called Calc, which is a simple calculator, whose code is below: public Calc(){ super("Calculadora"); Container tela = getContentPane(); setLayout(null); JLabel rotulo1 = new JLabel("1 numero: "); JL...
asked by 05.06.2016 / 23:48
1
answer

Get line from JTable after Filter Data

I am using a TableModel (not the DefaultTableModel ) that populate with data from banco ( MySQL ), also use a Class to filter through a JTextField . It is working correctly, but I would like, after filtering throu...
asked by 29.06.2016 / 03:57
1
answer

Simultaneous JTables

Hello, I would like to know if there is a way to select 2 JTables simultaneously, I will explain: I need some columns of my JTable, do not change when the horizontal JScrollBar is changed, according to my research, there is no way I can do th...
asked by 16.05.2016 / 15:41
1
answer

Add row with empty fields in a JTable

I have a AbstractTableModel only that I do not know how to add blank lines, when I hit the add line button in my frame I want it to call a method called addLine () from my TableTable, can anyone help me? public class ModeloTabela2 e...
asked by 29.04.2016 / 14:53
0
answers

JDateChooser Validation

I need to validate three dates that are of type JDateChooser . These dates are: date of birth, date of admission and date of dismissal. The date of birth can not be greater than the date of admission and no more than the date of dismiss...
asked by 20.03.2016 / 03:59
1
answer

Open Panel via a JMenuItem

I need to know how I can JMenuItem open JPanel , that is, by clicking JMenuItem , open the corresponding JPanel, this in Eclipse, through windowBuilder. This is the image of my screen with the menu: Image of the screen...
asked by 17.04.2016 / 22:12