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:QandE.SwingApp1.java
void createGUI(JFrame f) { startButton = new JButton("Start"); stopButton = new JButton("Stop"); label = new JLabel("Press Start.", JLabel.CENTER); Container c = f.getContentPane(); //Use the content pane's default BorderLayout layout manager. c.add(startButton, BorderLayout.WEST); c.add(stopButton, BorderLayout.EAST); c.add(label, BorderLayout.SOUTH); }
From source file:qic.ui.EditorPanel.java
private void setupFileTree() { TreeModel model = new FileTreeModel(new File(".")); fileTree = new JTree(model); fileTree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION); fileTree.addTreeSelectionListener(tse -> { File file = (File) fileTree.getLastSelectedPathComponent(); if (isFileEditable(file)) { saveCurrentScriptToFile();/*w w w . j a v a2s .c om*/ currentScript = file; loadFileToTextArea(file); } }); fileTree.setSelectionRow(0); add(new JScrollPane(fileTree), BorderLayout.EAST); }
From source file:fr.duminy.jbackup.swing.ProgressPanel.java
public void setTask(final Future<?> task) { this.task = task; if ((task != null) && (cancelButton == null)) { Utils.runInEventDispatchThread(new Runnable() { @Override/*from w ww.ja v a 2 s . co m*/ public void run() { ImageIcon icon = new ImageIcon(ProgressPanel.class.getResource("cancel.png")); cancelButton = new JButton(icon); cancelButton.setMargin(new Insets(0, 0, 0, 0)); cancelButton.setToolTipText(Bundle.getBundle(Messages.class).cancelTaskTooltip()); add(cancelButton, BorderLayout.EAST); revalidate(); cancelButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { if (task.cancel(false)) { removeFromParent(); } } }); } }); } }
From source file:savant.view.swing.Ruler.java
public Ruler() { this.mousePosition = new JLabel(); this.mousePosition.setHorizontalAlignment(SwingConstants.CENTER); this.add(this.mousePosition, BorderLayout.CENTER); this.recStart = new JLabel(); this.add(this.recStart, BorderLayout.WEST); this.recStop = new JLabel(); this.add(this.recStop, BorderLayout.EAST); this.cords = new JLabel(); this.add(this.cords, BorderLayout.NORTH); graphPaneController.addListener(new Listener<GraphPaneEvent>() { @Override/*from w ww . java 2 s. c om*/ public void handleEvent(GraphPaneEvent event) { if (graphPaneController.isPanning()) { repaint(); } } }); locationController.addListener(new Listener<LocationChangedEvent>() { @Override public void handleEvent(LocationChangedEvent event) { repaint(); } }); }
From source file:org.gitools.ui.core.components.editor.EditorTabComponent.java
public EditorTabComponent(EditorsPanel editorPanel, AbstractEditor editor) { this.editorPanel = editorPanel; this.editor = editor; editor.addEditorListener(new AbstractEditor.EditorListener() { @Override/* ww w . j a v a2 s .c om*/ public void dirtyChanged(IEditor editor) { updateLabel(); } @Override public void nameChanged(IEditor editor) { updateLabel(); } }); setOpaque(false); label = new JLabel(); label.setOpaque(false); label.setFocusable(false); label.addMouseListener(new MouseAdapter() { @Override public void mousePressed(MouseEvent e) { EditorTabComponent.this.editorPanel.setSelectedEditor(EditorTabComponent.this.editor); } }); //add more space between the label and the button label.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 5)); updateLabel(); //tab button JButton button = new TabButton(); setLayout(new BorderLayout()); add(label, BorderLayout.CENTER); add(button, BorderLayout.EAST); //add more space to the top of the component setBorder(BorderFactory.createEmptyBorder(2, 0, 0, 0)); }
From source file:org.kuali.test.ui.components.sqlquerypanel.WhereValueCellEditor.java
public WhereValueCellEditor(DatabasePanel dbPanel, JTextField tf) { super(new BorderLayout()); this.dbPanel = dbPanel; cellEditor = new DefaultCellEditor(tf); add(cellEditor.getComponent(), BorderLayout.CENTER); JPanel p = new JPanel(new FlowLayout(FlowLayout.CENTER, 0, 2)); p.add(lookup = new SearchButton()); p.add(new JSeparator(JSeparator.VERTICAL)); if (dbPanel.isForCheckpoint()) { p.add(executionParameter = new SearchButton(Constants.ADD_PARAM_ICON)); executionParameter.addActionListener(this); }/*from w w w . j a va 2 s .c o m*/ add(p, BorderLayout.EAST); lookup.setEnabled(false); lookup.addActionListener(this); }
From source file:qic.ui.TermsPanel.java
private void setupFileTree() { TreeModel model = new FileTreeModel(new File("terms")); fileTree = new JTree(model); fileTree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION); fileTree.addTreeSelectionListener(tse -> { File file = (File) fileTree.getLastSelectedPathComponent(); if (isFileEditable(file)) { saveCurrentScriptToFile();//w w w .j a va 2 s. c o m currentScript = file; loadFileToTextArea(file); } }); fileTree.setSelectionRow(1); add(new JScrollPane(fileTree), BorderLayout.EAST); }
From source file:qic.ui.ScriptsPanel.java
private void setupFileTree() { TreeModel model = new FileTreeModel(new File("script")); fileTree = new JTree(model); fileTree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION); fileTree.addTreeSelectionListener(tse -> { File file = (File) fileTree.getLastSelectedPathComponent(); if (isFileEditable(file)) { saveCurrentScriptToFile();//w w w . j a v a 2s. c o m currentScript = file; loadFileToTextArea(file); } }); fileTree.setSelectionRow(fileTree.getRowCount() > 3 ? 3 : 1); add(new JScrollPane(fileTree), BorderLayout.EAST); }
From source file:endrov.typeTimeRemap.TimeRemapWindow.java
/** * Make a new window/*from ww w .j a v a 2 s.c o m*/ */ public TimeRemapWindow() { bAdd.addActionListener(this); bRefresh.addActionListener(this); objectCombo.addActionListener(this); XYDataset xyDataset = new XYSeriesCollection(frametimeSeries); JFreeChart chart = ChartFactory.createXYLineChart("", "New time", "Original time", xyDataset, PlotOrientation.HORIZONTAL, false/*legend*/, false/*tooltips*/, false/*urls*/); ChartPanel graphpanel = new ChartPanel(chart); //Put GUI together JPanel datapanel = new JPanel(new BorderLayout()); JPanel dataparto = new JPanel(new BorderLayout()); dataparto.add(datapart, BorderLayout.NORTH); JScrollPane datapartscroll = new JScrollPane(dataparto, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); JPanel buttonpanel = new JPanel(new GridLayout(1, 2)); buttonpanel.add(bAdd); buttonpanel.add(bRefresh); datapanel.add(buttonpanel, BorderLayout.SOUTH); datapanel.add(datapartscroll, BorderLayout.CENTER); setLayout(new BorderLayout()); add(datapanel, BorderLayout.EAST); JPanel leftPanel = new JPanel(new BorderLayout()); leftPanel.add(graphpanel, BorderLayout.CENTER); leftPanel.add(objectCombo, BorderLayout.SOUTH); add(leftPanel, BorderLayout.CENTER); loadData(); //Window overall things setTitleEvWindow("Time remapper"); packEvWindow(); setBoundsEvWindow(new Rectangle(100, 100, 1000, 600)); setVisibleEvWindow(true); }
From source file:gisintegration.SimpleSwingBrowser.java
private void initComponents() { createScene();//www . ja v a2s . c om // ActionListener al = new ActionListener() { // @Override // public void actionPerformed(ActionEvent e) { // loadURL(txtURL.getText()); // } // }; // // btnGo.addActionListener(al); // txtURL.addActionListener(al); progressBar.setPreferredSize(new Dimension(150, 18)); progressBar.setStringPainted(true); // JPanel topBar = new JPanel(new BorderLayout(5, 0)); // topBar.setBorder(BorderFactory.createEmptyBorder(3, 5, 3, 5)); // topBar.add(txtURL, BorderLayout.CENTER); // topBar.add(btnGo, BorderLayout.EAST); JPanel statusBar = new JPanel(new BorderLayout(5, 0)); statusBar.setBorder(BorderFactory.createEmptyBorder(3, 5, 3, 5)); statusBar.add(lblStatus, BorderLayout.CENTER); statusBar.add(progressBar, BorderLayout.EAST); //panel.add(topBar, BorderLayout.NORTH); panel.add(jfxPanel, BorderLayout.CENTER); panel.add(statusBar, BorderLayout.SOUTH); setLayout(new BorderLayout()); add(panel, BorderLayout.CENTER); // setPreferredSize(new Dimension(1024, 600)); // setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // pack(); }