Package eas.startSetup.tableExamples

Source Code of eas.startSetup.tableExamples.MouseHoverTable

package eas.startSetup.tableExamples;

import java.awt.Window;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

import javax.swing.JFrame;
import javax.swing.JTable;

public class MouseHoverTable extends JFrame {

  private static final long serialVersionUID = 1L;
 
  static int itsRow = 0;
  static int itsColumn = 0;
  JTable itsTable;

  MouseHoverTable(String framename) {
    super(framename);
    itsTable = new JTable(5, 3);
    // make the table transparent
    itsTable.setOpaque(false);
    itsTable.setDefaultRenderer(Object.class, new AttributiveCellRenderer());
    MyMouseAdapter aMouseAda = new MyMouseAdapter();
    itsTable.addMouseMotionListener(aMouseAda);
    this.getContentPane().add(itsTable);// jsp);
  }

  @SuppressWarnings("deprecation")
  public static void main(String[] args) {
    JFrame frame = new MouseHoverTable("Table Example");
    frame.addWindowListener(new WindowAdapter() {
      @Override
      public void windowClosing(WindowEvent e) {
        Window w = e.getWindow();
        w.setVisible(false);
        w.dispose();
        System.exit(0);
      }
    });
    frame.pack();
    frame.show();
  }
}
TOP

Related Classes of eas.startSetup.tableExamples.MouseHoverTable

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.