java.awt.Button.addMouseListener()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(2.0k)|赞(0)|评价(0)|浏览(174)

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

Button.addMouseListener介绍

暂无

代码示例

代码示例来源:origin: stackoverflow.com

for(Button b : yourButtonCollection){
   CustomAct action = createCustomAction(b);
   b.addMouseListener(action);
}

代码示例来源:origin: stackoverflow.com

btn.addMouseListener(new MouseAdapter() {

代码示例来源:origin: net.imagej/ij

void addButton(String label) {
  Button b = new Button(label);
  b.addActionListener(this);
  b.addKeyListener(IJ.getInstance());
  b.addMouseListener(this);
  if (label.equals(moreButtonLabel)) moreButton = b;
  panel.add(b);
}

代码示例来源:origin: imagej/ImageJA

void addButton(String label) {
  Button b = new Button(label);
  b.addActionListener(this);
  b.addKeyListener(IJ.getInstance());
  b.addMouseListener(this);
  if (label.equals(moreButtonLabel)) moreButton = b;
  panel.add(b);
}

代码示例来源:origin: sc.fiji/MTrackJ_

private Button addButton(final String label) {
  
  final Button b = new Button(label);
  b.setPreferredSize(new Dimension(86,22));
  b.setForeground(Color.black);
  b.setFont(dialogfont);
  b.addActionListener(this);
  b.addMouseListener(this);
  gbc.gridx = leftbutton ? 0 : 1;
  gbc.insets = new Insets(newblock?space:0,0,0,0);
  gbl.setConstraints(b,gbc);
  add(b);
  leftbutton = !leftbutton;
  if (leftbutton) {
    ++gbc.gridy;
    newblock = false;
  }
  return b;
}

代码示例来源:origin: org.w3c.jigsaw/jigsaw

Button deleteb = new Button(DELETE_L);
deleteb.addActionListener(bbl);
deleteb.addMouseListener(mbl);
pan.add("West", deleteb);
  Button reindexb = new Button(REINDEX_L);
  reindexb.addActionListener(bbl);
  reindexb.addMouseListener(mbl);
  pan.add("East", reindexb);

代码示例来源:origin: org.scijava/scijava-ui-awt

button.addMouseListener(new MouseAdapter() {

代码示例来源:origin: org.w3c.jigsaw/jigsaw

commitb.addMouseListener(mbl);
resetb.addMouseListener(mbl);

代码示例来源:origin: sc.fiji/VIB_

c.anchor = GridBagConstraints.LINE_START;            
final Button button = new Button(p.name);
button.addMouseListener(new MouseAdapter(){
  @Override
  public void mousePressed(MouseEvent e){

相关文章