Questions tagged as 'swing'

1
answer

Jtable, add multi-lines [cell span] + Format table

I need to do something like this: AtthispointIhaveatablelikeImage1,butIwantedtocreateatablelikeImage2.HowcanIcreatesomethinglikethis?Anyideas?ThemostsimilarexampleIsawwas: link [EDIT] To create the multi-lines I used this class "Attr...
asked by 30.07.2014 / 10:38
1
answer

timer.swing delay

I'm doing a little game that flashes some orderly images in the frame, my goal is for them to blink in order, but they are blinking all together: public class Logica { List<Integer> seqAlea = new ArrayList<Integer>(); List...
asked by 22.11.2015 / 22:06
1
answer

How to implement the 'auto complete' feature in a JFormattedTextField?

I need when I type in JFormattedTextField to appear text suggestions. Is it possible to do this?     
asked by 14.05.2015 / 14:29
1
answer

Effect on edge of a JButton component

How do I create a smooth (fade) transition from the border of a JButton when hovering the mouse? My code looks like this: @Override public void mouseEntered(MouseEvent e) { Object temp = e.getSource(); if (temp instanceof JButton)...
asked by 26.04.2014 / 01:27
2
answers

Release only the last line for writing

How do I allow the user to be able to write only the last line of a JTextArea , that is, without being able to make modifications in the upper rows? (such as CMD or Terminal, for example).     
asked by 30.06.2016 / 03:02
1
answer

How to select only one radio button?

In Java swing, a user can select more than one radio button simultaneously, so that it does not happen, one can do: private void radio1ActionPerformed(java.awt.event.ActionEvent evt) { if (radio1.isSeleced()) { radio2.isSelected(fa...
asked by 11.10.2014 / 18:02
1
answer

Implement a "counter" of results

I have a search screen / query of records and when I do the query, for example, from all countries, a label "arrow" how many countries found, (eg 19 countries found) . However, if within these results I type a letter to match a country, for...
asked by 13.03.2017 / 21:14
1
answer

How to centralize the title of a JFrame?

I have a jFrame component and want to centralize the title of it, would it be possible?     
asked by 29.10.2016 / 23:15
2
answers

Apply filters in a JTable

I have a table and in a Jpanel on it I created a textFields and combobox with the intention of using them as a filter. The method: tableRowSorter.setRowFilter(RowFilter.regexFilter("(?i)" + busca)); Does he expect a string as a filter? If t...
asked by 21.11.2016 / 23:18
1
answer

Why is this method not adding up?

I'm trying to add two numbers by Swing and JOptionPane , but the below error is appearing. Someone to help me how to solve this? Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: JOptionPane: parentComponent d...
asked by 31.01.2017 / 15:09