Java Code Examples for javax.swing.JButton#repaint()
The following examples show how to use
javax.swing.JButton#repaint() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CheckThreadViolationRepaintManager.java From wpcleaner with Apache License 2.0 | 6 votes |
static void repaintTest() { try { SwingUtilities.invokeAndWait(new Runnable() { @Override public void run() { test = new JButton(); test.setSize(100, 100); } }); } catch (Exception e) { e.printStackTrace(); } // repaint(Rectangle) should be ok test.repaint(test.getBounds()); test.repaint(0, 0, 100, 100); test.repaint(); }
Example 2
Source File: SampleAnalysisWorkflowManagerIDTIMS.java From ET_Redux with Apache License 2.0 | 5 votes |
public void actionPerformed(ActionEvent e) { JDialog notesDialog = new FractionNotesDialog(parentFrame, true, fraction); notesDialog.setLocation(parentFrame.getX() + 500, parentFrame.getY() + 50); notesDialog.setVisible(true); JButton tempJB = (JButton) e.getSource(); tuneNotesButton(tempJB, ((UPbFraction) fraction).getFractionNotes()); tempJB.repaint(); }
Example 3
Source File: SampleAnalysisWorkflowManagerLAICPMS.java From ET_Redux with Apache License 2.0 | 5 votes |
public void actionPerformed(ActionEvent e) { JDialog notesDialog = new FractionNotesDialog(parentFrame, true, fraction); notesDialog.setLocation(parentFrame.getX() + 500, parentFrame.getY() + 50); notesDialog.setVisible(true); JButton tempJB = (JButton) e.getSource(); tuneNotesButton(tempJB, ((UPbFractionI) fraction).getFractionNotes()); tempJB.repaint(); }
Example 4
Source File: UPbFractionTableModel.java From ET_Redux with Apache License 2.0 | 5 votes |
@Override public void actionPerformed(ActionEvent e) { JDialog notesDialog = new FractionNotesDialog(parentFrame, true, fraction); notesDialog.setLocation(parentFrame.getX() + 350, parentFrame.getY() + 350); notesDialog.setVisible(true); JButton tempJB = (JButton) e.getSource(); tuneNotesButton(tempJB, fraction.getFractionNotes()); tempJB.repaint(); }
Example 5
Source File: SamplesPanel.java From CodenameOne with GNU General Public License v2.0 | 5 votes |
private void preventDoubleClick(JButton btn) { btn.setEnabled(false); btn.repaint(); javax.swing.Timer timer = new javax.swing.Timer(5000, e->{ btn.setEnabled(true); btn.repaint(); }); timer.start(); }