List of usage examples for java.awt BorderLayout EAST
String EAST
To view the source code for java.awt BorderLayout EAST.
Click Source Link
From source file:Proiect.uploadFTP.java
public uploadFTP() { uploadFTP.setIconImage(/*from w ww. j ava 2 s .c o m*/ Toolkit.getDefaultToolkit().getImage(getClass().getClassLoader().getResource("assets/ico.png"))); uploadFTP.setUndecorated(true); uploadFTP.getRootPane().setBorder(BorderFactory.createLineBorder(Encrypter.color_black, 2)); uploadFTP.setSize(400, 240); uploadFTP.setLocationRelativeTo(Encrypter.Center); uploadFTP.setResizable(false); uploadFTP.setVisible(true); cm.registerComponent(uploadFTP); uploadFTP.setLayout(new BorderLayout()); pan1.setLayout(new BorderLayout()); pan2.setLayout(new BorderLayout()); inpan1.setLayout(new GridLayout(6, 2, 0, 10)); inpan2.setLayout(new GridLayout(1, 2, 20, 0)); pan3.setLayout(new BorderLayout()); pan4.setLayout(new FlowLayout()); uploadFTP.add(pan3, BorderLayout.EAST); pan3.add(adv, BorderLayout.SOUTH); uploadFTP.add(pan1, BorderLayout.NORTH); pan1.add(titleFTP, BorderLayout.WEST); pan1.add(exit, BorderLayout.EAST); uploadFTP.add(pan2, BorderLayout.CENTER); pan2.add(inpan1, BorderLayout.NORTH); inpan1.add(adress); inpan1.add(adressf); inpan1.add(user); inpan1.add(userf); inpan1.add(pass); inpan1.add(passf); inpan1.add(folder); inpan1.add(folderf); inpan1.add(filen); inpan1.add(filenf); inpan1.add(status); pan2.add(inpan2, BorderLayout.SOUTH); inpan2.add(browsef); inpan2.add(connect); uploadFTP.add(pan4, BorderLayout.WEST); propFTP(); actionFTP(); /* BOF Load state */ try { FileInputStream fileStream = new FileInputStream( ClassLoader.getSystemResource("upload.prop").getPath()); ObjectInputStream os = new ObjectInputStream(fileStream); adressf.setText(os.readObject().toString()); userf.setText(os.readObject().toString()); passf.setText(os.readObject().toString()); os.close(); fileStream.close(); } catch (FileNotFoundException e1) { e1.printStackTrace(); } catch (IOException e1) { e1.printStackTrace(); } catch (ClassNotFoundException e1) { e1.printStackTrace(); } /* EOF Load state */ }
From source file:com.sshtools.common.ui.HostsTab.java
/** * Creates a new HostsTab object./* w w w. j a v a 2s .c o m*/ * * @param hostKeyVerifier */ public HostsTab(AbstractKnownHostsKeyVerification hostKeyVerifier) { super(); this.hostKeyVerifier = hostKeyVerifier; hosts = new JList(model = new HostsListModel()); hosts.setVisibleRowCount(10); hosts.setCellRenderer(new HostRenderer()); hosts.addListSelectionListener(new ListSelectionListener() { public void valueChanged(ListSelectionEvent evt) { setAvailableActions(); } }); remove = new JButton("Remove", new ResourceIcon(REMOVE_ICON)); remove.addActionListener(this); //deny = new JButton("Deny", new ResourceIcon(DENY_ICON)); //deny.addActionListener(this); JPanel b = new JPanel(new GridBagLayout()); b.setBorder(BorderFactory.createEmptyBorder(0, 8, 0, 0)); GridBagConstraints gbc = new GridBagConstraints(); gbc.fill = GridBagConstraints.HORIZONTAL; gbc.insets = new Insets(0, 0, 4, 0); gbc.anchor = GridBagConstraints.NORTH; gbc.weightx = 1.0; UIUtil.jGridBagAdd(b, remove, gbc, GridBagConstraints.REMAINDER); gbc.weighty = 1.0; //UIUtil.jGridBagAdd(b, deny, gbc, GridBagConstraints.REMAINDER); JPanel s = new JPanel(new BorderLayout()); s.add(new JScrollPane(hosts), BorderLayout.CENTER); s.add(b, BorderLayout.EAST); IconWrapperPanel w = new IconWrapperPanel(new ResourceIcon(GLOBAL_ICON), s); // This tab setLayout(new BorderLayout()); add(w, BorderLayout.CENTER); setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4)); reset(); }
From source file:com.googlecode.commons.swing.component.datetime.MiniDateCalendar.java
private void init() { final DateFormatSymbols dfs = new DateFormatSymbols(locale); CollectionUtils.addAll(this.weekdays, dfs.getShortWeekdays()); for (int i = 0; i < 7; i++) { orderedWeekdays.add(((i + weekDayStart - 1) % 7) + 1); }// w ww . j ava 2 s .c o m setLayout(new BorderLayout()); SizeUtils.setAllWidths(this, 150); SizeUtils.setAllHeights(this, 180); panNorth = new JPanel(new BorderLayout()); add(panNorth, BorderLayout.NORTH); btnPrev = new JButton(); SizeUtils.setAllWidths(btnPrev, 18); SizeUtils.setAllHeights(btnPrev, 18); btnPrev.setIcon(DefaultIcons.resultset_previous()); btnPrev.setMargin(new Insets(0, 0, 0, 0)); btnPrev.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { onClickPrev(); } }); panNorth.add(btnPrev, BorderLayout.WEST); lblMonth = new JLabel(); SizeUtils.setMinHeight(lblMonth, 0); SizeUtils.setPreferredHeight(lblMonth, 0); lblMonth.setHorizontalAlignment(SwingConstants.CENTER); panNorth.add(lblMonth, BorderLayout.CENTER); btnNext = new JButton(); btnNext.setIcon(DefaultIcons.resultset_next()); SizeUtils.setAllWidths(btnNext, 18); SizeUtils.setAllHeights(btnNext, 18); btnNext.setMargin(new Insets(0, 0, 0, 0)); btnNext.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { onClickNext(); } }); panNorth.add(btnNext, BorderLayout.EAST); panCenter = new JPanel(); panCenter.setLayout(new GridLayout(7, 7)); add(panCenter, BorderLayout.CENTER); for (int col = 0; col < 7; col++) { JLabel lblDay = new JLabel(weekdays.get(orderedWeekdays.get(col))); lblDay.setHorizontalAlignment(SwingConstants.CENTER); panCenter.add(lblDay); } ButtonGroup grp = new ButtonGroup(); for (int row = 0; row < 6; row++) { for (int col = 0; col < 7; col++) { final int day = orderedWeekdays.get(col); final DayButton btn = createDayButton(day, weekdays.get(day)); btn.setMargin(new Insets(0, 0, 0, 0)); btn.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { onClickDay(btn.value); } }); days.add(btn); grp.add(btn); panCenter.add(btn); } } refresh(); }
From source file:gda.gui.scanplot.ScanPlot.java
void hideLegend(boolean hide) { this.removeAll(); if (plot instanceof Component && legendPanel instanceof Component) { this.add((Component) plot, BorderLayout.CENTER); JPanel top = new JPanel(); top.setLayout(new BorderLayout()); top.add(legendVisible, BorderLayout.EAST); this.add(top, BorderLayout.NORTH); if (!hide) this.add((Component) legendPanel, BorderLayout.EAST); ((Component) plot).setPreferredSize(new Dimension(800, 800)); if (!hide) { ((Component) legendPanel).setPreferredSize(new Dimension(200, 800)); }// w w w. j a v a 2 s. co m } this.validate(); }
From source file:pdi.HistogramaRGB.java
private void mostraTela() { JFrame f = new JFrame("PDI - Histograma"); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); f.add(criaHistograma(), BorderLayout.EAST); f.add(new JLabel(new ImageIcon(imagem)), BorderLayout.WEST); f.add(criaPainel(), BorderLayout.SOUTH); f.pack();//from www. j a va 2 s .c o m f.setLocationRelativeTo(f); f.setVisible(true); }
From source file:max.hubbard.Factoring.Graphing.java
public static void makeGraphingInterface() { Interface.mainInterface();//from www . j av a2s .com panel = new JPanel(new BorderLayout(3, 225)); JPanel pan = new JPanel(); JLabel area = new JLabel("Graphing"); area.setBackground(Color.lightGray); area.setFont(new Font("Times New Roman", Font.BOLD, 20)); pan.add(area, BorderLayout.CENTER); panel.add(pan, BorderLayout.NORTH); final JTextField field = new JTextField(); panel.add(field, BorderLayout.CENTER); field.setFont(new Font("Times New Roman", Font.BOLD, 25)); field.setText("x^4-2x^2-8"); JButton start = new JButton("GO!"); start.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { panel.updateUI(); Main.label.setText(""); graph(field.getText()); } }); panel.add(start, BorderLayout.SOUTH); Main.getFrame().add(panel, BorderLayout.EAST); Main.getFrame().pack(); }
From source file:edu.purdue.cc.bionet.ui.MoleculeDetailPanel.java
public MoleculeDetailPanel(Molecule molecule, Range range, DetailWindow detailWindow, int correlationMethod) { super(new BorderLayout()); Logger logger = Logger.getLogger(getClass()); this.molecule = molecule; this.correlations = detailWindow.getCorrelations(); this.correlationMethod = correlationMethod; logger.debug(String.format("Showing Molecule detail:\n" + "\tMolecule: %s\n\tRange: %s\n", this.molecule, range)); this.correlationRange = range.clone(); this.detailWindow = detailWindow; Language language = Settings.getLanguage(); this.moleculeDetailTable = DataTable.getMoleculeTable(this.correlations, this.molecule); this.correlationsTable = DataTable.getCorrelatedTable(this.correlations, this.molecule, this.correlationRange, this.correlationMethod); this.selectedMoleculeLabel = new JLabel(language.get("Selected Molecule")); this.showElementButton = new JButton(language.get("Show Element")); this.showCorrelationButton = new JButton(language.get("Show Correlation")); this.coefLabel = new JLabel(String.format(language.get("Correlations between %.3f and %.3f"), this.correlationRange.getMin(), this.correlationRange.getMax())); // JPanel leftPanel = new JPanel( new BorderLayout( )); // JPanel rightPanel = new JPanel( new BorderLayout( )); JPanel moleculePanel = new JPanel(new BorderLayout()); JPanel correlationPanel = new JPanel(new BorderLayout()); JPanel buttonPanel = new JPanel(new BorderLayout()); this.showElementButton.addActionListener(this); this.showCorrelationButton.addActionListener(this); buttonPanel.add(this.showElementButton, BorderLayout.WEST); buttonPanel.add(this.showCorrelationButton, BorderLayout.EAST); moleculePanel.add(this.selectedMoleculeLabel, BorderLayout.NORTH); moleculePanel.add(new JScrollPane(this.moleculeDetailTable), BorderLayout.CENTER); correlationPanel.add(this.coefLabel, BorderLayout.NORTH); correlationPanel.add(new JScrollPane(this.correlationsTable), BorderLayout.CENTER); correlationPanel.add(buttonPanel, BorderLayout.SOUTH); JSplitPane leftPanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT, moleculePanel, correlationPanel); leftPanel.setDividerLocation(200);//from w w w . ja v a 2s. c om // leftPanel.add( moleculePanel, BorderLayout.NORTH ); // leftPanel.add( correlationPanel, BorderLayout.CENTER ); JPanel rightPanel = new ResponseGraph(this.molecule.getSampleMap(this.correlations.getSamples())); JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, leftPanel, rightPanel); splitPane.setDividerLocation(300); this.add(splitPane, BorderLayout.CENTER); }
From source file:LayeredPaneDemo.java
public void createTitleBar() { titlePanel = new JPanel() { public Dimension getPreferredSize() { return new Dimension(InnerFrame.WIDTH, InnerFrame.TITLE_BAR_HEIGHT); }//from w ww. j a v a 2 s . c o m }; titlePanel.setLayout(new BorderLayout()); titlePanel.setOpaque(true); titlePanel.setBackground(TITLE_BAR_BG_COLOR); titleLabel = new JLabel(title); titleLabel.setForeground(Color.black); buttonWrapperPanel = new JPanel(); buttonWrapperPanel.setOpaque(false); buttonPanel = new JPanel(new GridLayout(1, 2)); buttonPanel.setOpaque(false); buttonPanel.setAlignmentX(0.5f); buttonPanel.setAlignmentY(0.5f); buttonWrapperPanel.add(buttonPanel); titlePanel.add(titleLabel, BorderLayout.CENTER); titlePanel.add(buttonWrapperPanel, BorderLayout.EAST); InnerFrameTitleBarMouseAdapter iftbma = new InnerFrameTitleBarMouseAdapter(this); titlePanel.addMouseListener(iftbma); titlePanel.addMouseMotionListener(iftbma); }
From source file:org.codinjutsu.tools.nosql.redis.view.RedisPanel.java
protected void buildQueryToolBar() { toolBarPanel.setLayout(new BorderLayout()); filterField = new JBTextField("*"); filterField.setColumns(10);/*from www .j ava 2s.co m*/ NonOpaquePanel westPanel = new NonOpaquePanel(); NonOpaquePanel filterPanel = new NonOpaquePanel(); filterPanel.add(new JLabel("Filter: "), BorderLayout.WEST); filterPanel.add(filterField, BorderLayout.CENTER); filterPanel.add(Box.createHorizontalStrut(5), BorderLayout.EAST); westPanel.add(filterPanel, BorderLayout.WEST); toolBarPanel.add(westPanel, BorderLayout.WEST); addCommonsActions(); }
From source file:org.kepler.gui.kar.KarManifestViewer.java
public void initialize(KARFile karFile) { if (isDebugging) { log.debug("initialize( " + karFile + " )"); }/* w ww. j a v a2s.co m*/ _karFile = karFile; JPanel layoutPanel = new JPanel(); layoutPanel.setLayout(new BorderLayout()); JPanel lsidPanel = new JPanel(); lsidPanel.setLayout(new BorderLayout()); JLabel lsidLabel = new JLabel("KAR LSID:"); lsidPanel.add(lsidLabel, BorderLayout.WEST); _lsidField = new JTextField(""); _lsidField.setEditable(false); lsidPanel.add(_lsidField, BorderLayout.CENTER); JPanel dfPanel = new JPanel(); dfPanel.setLayout(new BorderLayout()); _manifestField = new JTextArea(""); _manifestField.setEditable(false); _manifestScrollPane = new JScrollPane(_manifestField); _manifestScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); _manifestScrollPane .setBorder( BorderFactory.createCompoundBorder( BorderFactory.createCompoundBorder(BorderFactory.createTitledBorder("Manifest"), BorderFactory.createEmptyBorder(5, 5, 5, 5)), _manifestScrollPane.getBorder())); dfPanel.add(_manifestScrollPane, BorderLayout.CENTER); JPanel buttonPanel = new JPanel(); buttonPanel.setLayout(new BorderLayout()); String infStr = _karFile.getName(); JLabel objInfo = new JLabel(infStr); buttonPanel.add(objInfo, BorderLayout.CENTER); JButton refreshButton = new JButton("Refresh"); refreshButton.addActionListener(this); buttonPanel.add(refreshButton, BorderLayout.EAST); layoutPanel.add(lsidPanel, BorderLayout.NORTH); layoutPanel.add(dfPanel, BorderLayout.CENTER); layoutPanel.add(buttonPanel, BorderLayout.SOUTH); getContentPane().add(layoutPanel); refreshValues(); getContentPane().setBackground(Color.WHITE); }