Refine search
public SendDialog(Frame parent, Node dest, String src, RpcDispatcher disp) { super(parent, "Send message to " + dest.lbl + " at " + dest.addr, true); Panel p1=new Panel(), p2=new Panel(); Button send=new Button("Send"), send_all=new Button("Send to all"); Button cancel=new Button("Cancel"); this.disp=disp; this.dest=dest; sender=src; send.setFont(default_font); send_all.setFont(default_font); cancel.setFont(default_font); msg.setFont(default_font); p1.setLayout(new BorderLayout()); p1.add(msg); p2.setLayout(new FlowLayout()); send.addActionListener(this); send_all.addActionListener(this); cancel.addActionListener(this); p2.add(send); p2.add(send_all); p2.add(cancel); add("Center", p1); add("South", p2); setSize(300, 150); Point my_loc=parent.getLocation(); my_loc.x+=50; my_loc.y+=150; setLocation(my_loc); setVisible(true); }
public MessageDialog(Frame parent, String sender, String msg) { super(parent, "Msg from " + sender); Button ok=new Button("OK"); setLayout(new BorderLayout()); setBackground(Color.white); ok.setFont(default_font); text.setFont(default_font); text.setEditable(false); text.setText(msg); ok.addActionListener(this); add("Center", text); add("South", ok); setSize(300, 150); Point my_loc=parent.getLocation(); my_loc.x+=50; my_loc.y+=150; setLocation(my_loc); Toolkit.getDefaultToolkit().beep(); show(); }
save_button = new Button("SAVE"); button_panel.add(save_button); addGridComponent(this, save_button.addActionListener( this );
resize(200, 200); add("Center", panel); clear_button=new Button("Clear"); clear_button.setFont(default_font); clear_button.addActionListener(this); leave_button=new Button("Exit"); leave_button.setFont(default_font); leave_button.addActionListener(this); mbr_label=new Label("0 mbr(s)"); mbr_label.setFont(default_font);
startBrowser = new Button("Start Browser"); startBrowser.setFocusable(false); startBrowser.setActionCommand("console"); startBrowser.addActionListener(this); startBrowser.setFont(font); mainPanel.add(startBrowser, constraintsButton);
add("Center", panel); Panel p = new Panel(); leave_button = new Button("Exit"); leave_button.setFont(default_font); leave_button.addActionListener(this); mbr_label = new Label("1 mbr(s)"); mbr_label.setFont(default_font);
save_button = new Button("SAVE"); button_panel.add(save_button); addGridComponent(this, save_button.addActionListener( this );
public void addCompletingButton( String key, String text ) { Button newButton = new Button(text); newButton.addActionListener(this); completingButtons.add(newButton); }
private Button addButton(String label) { final Button b = new Button(" "+label+" "); b.addActionListener(this); panel.add(b); return b; }
void addButton(String label) { Button b = new Button(label); b.addActionListener(this); panel.add(b); } void addLabel(String label) {
private Button addButton(String label) { final Button b = new Button(" "+label+" "); b.addActionListener(this); panel.add(b); return b; }
public void init() { add(b1 = new Button("A button")); b1.addActionListener(this); add(b2 = new Button("Another button")); b2.addActionListener(this); }
public void init() { add(b1 = new Button("A button")); b1.addActionListener(handler); add(b2 = new Button("Another button")); b2.addActionListener(handler); }
private void addToolbar() { Button importButton = new Button("Import"); importButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent arg0) { doImport(); } }); JToolBar toolBar = new JToolBar(); toolBar.setFloatable(false); toolBar.add(importButton); getContentPane().add(toolBar, BorderLayout.PAGE_START); }
public PostQuery() { add(goButton = new Button("Go for it!")); goButton.addActionListener(this); }
/** Creates a panel containing "Save...", "Save..." and "Preview" buttons. */ Panel makeButtonPanel(GenericDialog gd) { Panel buttons = new Panel(); buttons.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 0)); open = new Button("Open..."); open.addActionListener(this); buttons.add(open); save = new Button("Save..."); save.addActionListener(this); buttons.add(save); return buttons; }
/** Creates a panel containing "Open..." and "Save..." buttons. */ Panel makeButtonPanel(GenericDialog gd) { Panel buttons = new Panel(); buttons.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 0)); open = new Button("Open..."); open.addActionListener(this); buttons.add(open); save = new Button("Save..."); save.addActionListener(this); buttons.add(save); return buttons; }
Panel makeButtonPanel(GenericDialog gd) { Panel panel = new Panel(); //buttons.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 0)); colorButton = new Button("\"Show All\" Color..."); colorButton.addActionListener(this); panel.add(colorButton); return panel; }
/** Creates a panel containing "Save...", "Save..." and "Preview" buttons. */ Panel makeButtonPanel(GenericDialog gd) { Panel buttons = new Panel(); buttons.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 0)); open = new Button("Open..."); open.addActionListener(this); buttons.add(open); save = new Button("Save..."); save.addActionListener(this); buttons.add(save); return buttons; }
/** Creates a panel containing "Open..." and "Save..." buttons. */ Panel makeButtonPanel(GenericDialog gd) { Panel buttons = new Panel(); buttons.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 0)); open = new Button("Open..."); open.addActionListener(this); buttons.add(open); save = new Button("Save..."); save.addActionListener(this); buttons.add(save); return buttons; }