本文整理了Java中javax.swing.JDialog.addMouseListener()
方法的一些代码示例,展示了JDialog.addMouseListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JDialog.addMouseListener()
方法的具体详情如下:
包路径:javax.swing.JDialog
类名称: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);
}
内容来源于网络,如有侵权,请联系作者删除!