List of usage examples for javax.swing BorderFactory createLineBorder
public static Border createLineBorder(Color color)
From source file:my.jabbr.app.ftpclient.ui.install.ProductLicenseInstallationPanel.java
private void initComponents() { try {// w w w. j av a 2s. c om String licenseStr = FileUtils.readFileToString(new File(ConfigManager.GPL_LICENSE_FILE)); licenseText = new JTextArea(licenseStr); licenseText.setColumns(20); licenseText.setRows(15); licenseText.setBorder(BorderFactory.createLineBorder(UIAccessories.BORDER_GRAY)); licenseText.setBackground(UIAccessories.WHITE); licenseText.setEditable(false); JScrollPane scrollPane = new JScrollPane(licenseText); scrollPane.setBorder(null); scrollPane.setOpaque(false); scrollPane.getViewport().setOpaque(false); scrollPane.getViewport().setBorder(null); scrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); setLayout(new BorderLayout(20, 20)); add(createTransparentFillerPanel(), BorderLayout.NORTH); add(scrollPane, BorderLayout.CENTER); } catch (IOException e) { e.printStackTrace(); } this.setOpaque(false); }
From source file:Main.java
/** Set the border of the given components to a black line border. */ public static void setLineBorder(JComponent... components) { setBorder(BorderFactory.createLineBorder(Color.BLACK), components); }
From source file:Main.java
protected Listm(int rows, int cols) { super(rows, cols); setBorder(BorderFactory.createLineBorder(Color.blue)); }
From source file:Main.java
@Override public void updateUI() { super.updateUI(); setUI(new BasicComboBoxUI() { @Override//from ww w . j a va2s. c o m protected JButton createArrowButton() { return new JButton() { @Override public int getWidth() { return 0; } }; } }); setBorder(BorderFactory.createLineBorder(Color.GRAY)); }
From source file:neironweb.Frame.java
public Frame() { super("neural network"); //JPanel pane = new JPanel(); setLayout(null);//from w w w . j a v a 2 s.com JPanel mailPanel = new JPanel(); mailPanel.setLayout(null); mailPanel.setLocation(50, 30); mailPanel.setSize(300, 170); mailPanel.setBorder(BorderFactory.createLineBorder(Color.black)); JLabel mailLabel = new JLabel("e-mail:"); mailLabel.setLocation(10, 10); mailLabel.setSize(50, 30); mailPanel.add(mailLabel); JLabel dirMailLabel = new JLabel("direct:"); dirMailLabel.setLocation(10, 50); dirMailLabel.setSize(50, 30); mailPanel.add(dirMailLabel); JTextField mailField = new JTextField("mail@mail.ru"); mailField.setSize(150, 30); mailField.setLocation(80, 10); mailPanel.add(mailField); JTextField textField = new JTextField("INBOX"); textField.setLocation(80, 50); textField.setSize(150, 30); mailPanel.add(textField); JButton mailButton = new JButton("Analyze"); mailButton.setLocation(80, 90); mailButton.setSize(150, 30); mailPanel.add(mailButton); // JButton eduButton = new JButton("Start education"); // eduButton.setLocation(0, 50); // eduButton.setSize(150, 30); // buttonPanel.add(eduButton); XYSeries xyser = new XYSeries(""); XYDataset xy = new XYSeriesCollection(xyser); JFreeChart jf = ChartFactory.createXYLineChart("Education", "X", "Y", xy); for (int i = 0; i < 100; i++) xyser.add(i, Math.cos(i)); ChartPanel chartPanel = new ChartPanel(jf); chartPanel.setSize(700, 300); chartPanel.setLocation(50, 230); chartPanel.setBorder(BorderFactory.createLineBorder(Color.black)); // JPanel myChartPanel = new JPanel(); // myChartPanel.setLayout(null); // myChartPanel.setLocation(50, 230); // myChartPanel.setSize(700, 300); // myChartPanel // myChartPanel.add(chartPanel); setSize(800, 600); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); Container con = this.getContentPane(); // inherit main frame //con.add(pane); con.add(mailPanel); //con.add(myChartPanel); con.add(chartPanel); setVisible(true); }
From source file:Main.java
@Override public void updateUI() { super.updateUI(); UIManager.put("ComboBox.squareButton", Boolean.FALSE); setUI(new BasicComboBoxUI() { @Override/*from w w w.j ava 2 s .c o m*/ protected JButton createArrowButton() { JButton b = new JButton(); b.setBorder(BorderFactory.createEmptyBorder()); b.setVisible(false); return b; } }); setBorder(BorderFactory.createLineBorder(Color.GRAY)); }
From source file:de.ep3.ftpc.view.designer.UIDesigner.java
public UIDesigner() { defaultBorderColor = Color.GRAY; defaultBorder = BorderFactory.createLineBorder(defaultBorderColor); }
From source file:com.haulmont.cuba.desktop.sys.WindowBreadCrumbs.java
public WindowBreadCrumbs() { FlowLayout layout = new FlowLayout(FlowLayout.LEFT, 5, 5); setLayout(layout);/* w ww. j ava 2s . c o m*/ setBorder(BorderFactory.createLineBorder(Color.gray)); setVisible(false); }
From source file:com.okmich.hackerday.client.tool.dashboard.ReportItemPanel.java
/** * Creates new form ReportItemPanel// ww w . j a v a 2s . co m * * @param title * @param handler */ public ReportItemPanel(String title, Handler handler) { this.handler = handler; this.handler.registerUI(this); //UI specifics this.title = title; setMinimumSize(new java.awt.Dimension(400, 300)); setLayout(new java.awt.BorderLayout()); setBorder(BorderFactory.createLineBorder(Color.GRAY)); // containPanel = new JPanel(new BorderLayout(5, 5)); // buildContainerPanel(); // add(containPanel, BorderLayout.NORTH); add(createChartPanel(), BorderLayout.CENTER); }
From source file:com.tencent.wstt.apt.chart.PieChart.java
public PieChart() { super(new BorderLayout()); chart = createChart();//ww w . jav a2s.com final ChartPanel chartPanel = new ChartPanel(chart); chartPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4), BorderFactory.createLineBorder(Color.black))); this.add(chartPanel); }