List of usage examples for javax.swing BorderFactory createRaisedSoftBevelBorder
public static Border createRaisedSoftBevelBorder()
From source file:Main.java
public static void main(final String args[]) { JFrame frame = new JFrame("Justified Titled Borders"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); Border raisedBorder = BorderFactory.createRaisedSoftBevelBorder(); JButton raisedButton = new JButton("Raised"); raisedButton.setBorder(raisedBorder); Container contentPane = frame.getContentPane(); contentPane.add(raisedButton);// w w w. ja v a 2 s .c om frame.setSize(300, 200); frame.setVisible(true); }
From source file:Test.java
public Test() { this.setBounds(100, 100, 200, 100); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JPanel panel = new JPanel(); panel.setBorder(BorderFactory.createRaisedSoftBevelBorder()); this.setLayout(new FlowLayout()); JButton exitButton = new JButton("Exit"); panel.add(exitButton);/*ww w .j a v a 2 s. c o m*/ this.add(panel); exitButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent event) { System.exit(0); } }); }
From source file:com.diversityarrays.kdxplore.trials.TrialDetailsPanel.java
TrialDetailsPanel(WindowOpener<JFrame> windowOpener, MessagePrinter mp, BackgroundRunner backgroundRunner, OfflineData offlineData, Action editTrialAction, Action seedPrepAction, Action harvestAction, Action uploadTrialAction, Action refreshTrialInfoAction, ImageIcon barcodeIcon, Transformer<Trial, Boolean> checkIfEditorActive, Consumer<Trial> onTraitInstancesRemoved) { super(new BorderLayout()); this.editTrialAction = editTrialAction; this.uploadTrialAction = uploadTrialAction; this.refreshTrialInfoAction = refreshTrialInfoAction; this.onTraitInstancesRemoved = onTraitInstancesRemoved; this.messagePrinter = mp; this.backgroundRunner = backgroundRunner; this.offlineData = offlineData; if (barcodeIcon == null) { barcodesMenuButton = new JLabel("Barcodes"); //$NON-NLS-1$ } else {/* ww w.j a v a 2s.c o m*/ barcodesMenuButton = new JLabel(barcodeIcon); } barcodesMenuButton.setBorder(BorderFactory.createRaisedSoftBevelBorder()); barcodesMenuButton.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { if (trial != null) { barcodesMenuHandler.handleMouseClick(e.getPoint()); } } }); trialViewPanel = new TrialViewPanel(windowOpener, offlineData, checkIfEditorActive, onTraitInstancesRemoved, mp); Box buttons = Box.createHorizontalBox(); buttons.add(new JButton(refreshTrialInfoAction)); buttons.add(new JButton(seedPrepAction)); buttons.add(new JButton(editTrialAction)); buttons.add(new JButton(uploadTrialAction)); buttons.add(new JButton(harvestAction)); buttons.add(barcodesMenuButton); buttons.add(Box.createHorizontalGlue()); // JPanel trialPanel = new JPanel(new BorderLayout()); // trialPanel.add(buttons, BorderLayout.NORTH); // trialPanel.add(fieldViewPanel, BorderLayout.CENTER); cardPanel.add(new JLabel(Msg.LABEL_NO_TRIAL_SELECTED()), CARD_NO_TRIAL); cardPanel.add(trialViewPanel, CARD_HAVE_TRIAL); setSelectedTrial(null); add(buttons, BorderLayout.NORTH); add(cardPanel, BorderLayout.CENTER); }