Exemplo n.º 1
0
 public void mouseEntered(MouseEvent e) {
   JToggleButton btn = (JToggleButton) c;
   btn.setForeground(Color.red);
   btn.setBackground(Color.orange);
   Cursor cursor = Cursor.getPredefinedCursor(Cursor.HAND_CURSOR);
   btn.setCursor(cursor);
 }
Exemplo n.º 2
0
  public void addButton(JToggleButton b) {
    imagePanel.add(b);

    b.setForeground(Color.black);
    b.setBackground(Color.white);
    b.setFocusable(false);
    b.addMouseListener(new PopupMouseListener(b));
    b.addActionListener(new PopupActionListener(b));
  }
Exemplo n.º 3
0
 public void actionPerformed(ActionEvent e) {
   // String currentMessage = clientWindowFrame.massageField.getText();
   // clientWindowFrame.massageField.setText(currentMessage+"/*" +((JButton) c).getText()+"*/");
   JToggleButton btn = (JToggleButton) c;
   btn.setForeground(Color.black);
   btn.setBackground(Color.white);
   mouseMenu.setVisible(false);
   actionButton.setIcon(btn.getIcon());
   actionButton.setToolTipText(btn.getToolTipText());
 }
Exemplo n.º 4
0
 public void mouseExited(MouseEvent e) {
   JToggleButton btn = (JToggleButton) c;
   btn.setForeground(Color.black);
   btn.setBackground(Color.white);
 }