javax.swing.JDialog.addMouseListener()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(1.2k)|赞(0)|评价(0)|浏览(113)

本文整理了Java中javax.swing.JDialog.addMouseListener()方法的一些代码示例,展示了JDialog.addMouseListener()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JDialog.addMouseListener()方法的具体详情如下:
包路径:javax.swing.JDialog
类名称:JDialog
方法名:addMouseListener

JDialog.addMouseListener介绍

暂无

代码示例

代码示例来源:origin: org.apache.jmeter/ApacheJMeter_core

about.addMouseListener(new MouseAdapter() {
  @Override
  public void mouseClicked(MouseEvent e) {

代码示例来源:origin: org.cytoscape/swing-application-impl

public void showCredits() {
  dialog = new JDialog(parent,true);
  dialog.setUndecorated(true);
  final ScrollingLinesPanel panel = new ScrollingLinesPanel(image, lines);
  dialog.add(panel);
  dialog.pack();
  dialog.validate();
  dialog.setPreferredSize(panel.getPreferredSize());
  centerDialogLocation(dialog);
  Action scrollText = new AbstractAction() {
    private final static long serialVersionUID = 1202340446391603L;
    public void actionPerformed(ActionEvent e) {
      panel.incrementYPos();
      dialog.repaint();
    }
  };
  timer = new Timer(100, scrollText);
  dialog.addMouseListener(new MouseListener() {
      public void mouseClicked(MouseEvent e) {
        hideCredits();
      }
      public void mouseEntered(MouseEvent e) { }
      public void mouseExited(MouseEvent e) { }
      public void mousePressed(MouseEvent e) { }
      public void mouseReleased(MouseEvent e) { }
    });
  timer.start();
  dialog.setVisible(true);
}

相关文章

JDialog类方法