List of usage examples for java.awt BorderLayout SOUTH
String SOUTH
To view the source code for java.awt BorderLayout SOUTH.
Click Source Link
From source file:Interface.ResultadoJanela.java
public ResultadoJanela(List<Resultado> tar, List<Resultado> jac, List<Resultado> och, List<Resultado> sbi) { // super("Resultado"); CategoryDataset dataset;//from ww w . j av a2 s.c om //---------------------gerando resultados tarantula------------------------------------- dataset = gerarDataset(tar, jac, och, sbi); JFreeChart chart = gerarGrafico(dataset); ChartPanel chartPanel = new ChartPanel(chart); chartPanel.setDomainZoomable(true); JLabel lAjuda = new JLabel("Ajuda", JLabel.RIGHT); lAjuda.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icone_informacao.gif"))); // NOI18N lAjuda.setPreferredSize(new Dimension(50, 50)); lAjuda.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { lAjudaMouseClicked(evt); } }); JPanel panel = new JPanel(); panel.setLayout(new BorderLayout()); panel.add(lAjuda, BorderLayout.BEFORE_FIRST_LINE); panel.add(chartPanel, BorderLayout.LINE_START); JLabel lTabela = new JLabel("Tabela de Resultados", JLabel.CENTER); panel.add(lTabela, BorderLayout.SOUTH); JTable table = new JTable(criarValores(tar, jac, och, sbi), criarColunas()); // Adiciona o JTable dentro do painel JScrollPane scrollPane = new JScrollPane(table); table.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS); panel.add(scrollPane, BorderLayout.SOUTH); JFrame frame = new JFrame(); frame.setTitle("JLoc - Resultado"); frame.setVisible(true); frame.add(panel); frame.pack(); frame.setVisible(true); }
From source file:TextComponentTest.java
public TextComponentFrame() { setTitle("TextComponentTest"); setSize(DEFAULT_WIDTH, DEFAULT_HEIGHT); final JTextField textField = new JTextField(); final JPasswordField passwordField = new JPasswordField(); JPanel northPanel = new JPanel(); northPanel.setLayout(new GridLayout(2, 2)); northPanel.add(new JLabel("User name: ", SwingConstants.RIGHT)); northPanel.add(textField);//from ww w . j ava2 s .c om northPanel.add(new JLabel("Password: ", SwingConstants.RIGHT)); northPanel.add(passwordField); add(northPanel, BorderLayout.NORTH); final JTextArea textArea = new JTextArea(8, 40); JScrollPane scrollPane = new JScrollPane(textArea); add(scrollPane, BorderLayout.CENTER); // add button to append text into the text area JPanel southPanel = new JPanel(); JButton insertButton = new JButton("Insert"); southPanel.add(insertButton); insertButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent event) { textArea.append("User name: " + textField.getText() + " Password: " + new String(passwordField.getPassword()) + "\n"); } }); add(southPanel, BorderLayout.SOUTH); // add a text area with scroll bars }
From source file:JTreeSimple.java
/** Construct the object including its GUI */ public JTreeSimple() { super("JTreeSimple"); Container cp = getContentPane(); cp.setLayout(new BorderLayout()); myTree = new JTree(); JScrollPane scroller = new JScrollPane(myTree); cp.add(BorderLayout.CENTER, scroller); cp.add(BorderLayout.SOUTH, quitButton = new JButton("Exit")); quitButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { setVisible(false);/*from w w w .ja va 2s . com*/ dispose(); System.exit(0); } }); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); pack(); }
From source file:org.csml.tommo.sugar.modules.heatmap.InteractiveHeatmapDialog.java
public InteractiveHeatmapDialog(int row, int col, ResultsTable table) { super(SugarApplication.getApplication()); initData(row, col, table);//from www . j a v a 2 s . com timer = new Timer(1000, this); List<TileBPCoordinates> tileBPCoordinateList = table.getTileBPCoordinateList(row, col); int colSpan = col == table.getColumnCount() - 1 ? 1 : 2; int rowSpan = tileBPCoordinateList.size() / colSpan; centerPanel = new JPanel(new GridLayout(rowSpan, colSpan)); JPanel buttonsPanel = createButtonsPanel(); setLayout(new BorderLayout()); rebuild(); add(centerPanel, BorderLayout.CENTER); add(buttonsPanel, BorderLayout.SOUTH); setLocation(400, 350); setSize(250 * colSpan, 250 * rowSpan); }
From source file:com.dal.a.ui.DalAppConsole.java
private void coreSetup() { setLayout(new BorderLayout()); setJMenuBar(initializeMenu());//from w w w. ja va 2 s . c o m add(new DalStatusBar(), BorderLayout.SOUTH); parentPane.setOrientation(JSplitPane.HORIZONTAL_SPLIT); parentPane.setTopComponent(treeView); parentPane.setBottomComponent(centerPane); centerPane.setOrientation(JSplitPane.VERTICAL_SPLIT); centerPane.setLeftComponent(listView); centerPane.setRightComponent(detailView); add(parentPane, BorderLayout.CENTER); }
From source file:Tree1.java
public Tree1() { super("Sample Tree [OID]"); setSize(400, 300);// w w w . j a va 2s . c o m Object[] nodes = new Object[5]; DefaultMutableTreeNode top = new DefaultMutableTreeNode(new OidNode(1, "ISO")); DefaultMutableTreeNode parent = top; nodes[0] = top; DefaultMutableTreeNode node = new DefaultMutableTreeNode(new OidNode(0, "standard")); parent.add(node); node = new DefaultMutableTreeNode(new OidNode(2, "member-body")); parent.add(node); node = new DefaultMutableTreeNode(new OidNode(3, "org")); parent.add(node); parent = node; nodes[1] = parent; node = new DefaultMutableTreeNode(new OidNode(6, "dod")); parent.add(node); parent = node; nodes[2] = parent; node = new DefaultMutableTreeNode(new OidNode(1, "internet")); parent.add(node); parent = node; nodes[3] = parent; node = new DefaultMutableTreeNode(new OidNode(1, "directory")); parent.add(node); node = new DefaultMutableTreeNode(new OidNode(2, "mgmt")); parent.add(node); nodes[4] = node; node.add(new DefaultMutableTreeNode(new OidNode(1, "mib-2"))); node = new DefaultMutableTreeNode(new OidNode(3, "experimental")); parent.add(node); node = new DefaultMutableTreeNode(new OidNode(4, "private")); node.add(new DefaultMutableTreeNode(new OidNode(1, "enterprises"))); parent.add(node); node = new DefaultMutableTreeNode(new OidNode(5, "security")); parent.add(node); node = new DefaultMutableTreeNode(new OidNode(6, "snmpV2")); parent.add(node); node = new DefaultMutableTreeNode(new OidNode(7, "mail")); parent.add(node); m_model = new DefaultTreeModel(top); m_tree = new JTree(m_model); DefaultTreeCellRenderer renderer = new DefaultTreeCellRenderer(); renderer.setOpenIcon(new ImageIcon("opened.gif")); renderer.setClosedIcon(new ImageIcon("closed.gif")); renderer.setLeafIcon(new ImageIcon("leaf.gif")); m_tree.setCellRenderer(renderer); m_tree.setShowsRootHandles(true); m_tree.setEditable(false); TreePath path = new TreePath(nodes); m_tree.setSelectionPath(path); m_tree.addTreeSelectionListener(new OidSelectionListener()); JScrollPane s = new JScrollPane(); s.getViewport().add(m_tree); getContentPane().add(s, BorderLayout.CENTER); m_display = new JTextField(); m_display.setEditable(false); getContentPane().add(m_display, BorderLayout.SOUTH); WindowListener wndCloser = new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0); } }; addWindowListener(wndCloser); setVisible(true); }
From source file:gtu._work.ui.ObnfCheckPDFErrorUI.java
private void initGUI() { try {// www . j a va 2s.c o m JCommonUtil.frameCloseConfirm(this); BorderLayout thisLayout = new BorderLayout(); setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); getContentPane().setLayout(thisLayout); { jTabbedPane1 = new JTabbedPane(); getContentPane().add(jTabbedPane1, BorderLayout.CENTER); { jPanel2 = new JPanel(); BorderLayout jPanel2Layout = new BorderLayout(); jPanel2.setLayout(jPanel2Layout); jTabbedPane1.addTab("log", null, jPanel2, null); { jScrollPane2 = new JScrollPane(); jPanel2.add(jScrollPane2, BorderLayout.CENTER); { logArea = new JTextArea(); jScrollPane2.setViewportView(logArea); } } { checkBtn = new JButton(); jPanel2.add(checkBtn, BorderLayout.SOUTH); checkBtn.setText("\u6aa2\u67e5"); checkBtn.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { checkBtnActionPerformed(); } }); } } } pack(); this.setSize(542, 394); } catch (Exception e) { //add your error handling code here e.printStackTrace(); } }
From source file:lu.lippmann.cdb.datasetview.tabs.WeightedMapOfDecisionTreesTabView.java
/** * Constructor./* w w w.j a v a2 s .c o m*/ */ public WeightedMapOfDecisionTreesTabView(final EventPublisher eventPublisher, final CommandDispatcher commandDispatcher, final ApplicationContext applicationContext) { super(); this.applicationContext = applicationContext; this.commandDispatcher = commandDispatcher; this.eventPublisher = eventPublisher; final double defaultValueConfidenceFactor = DecisionTreeHelper.HIGH_CONFIDENCE_FACTOR; this.dtFactory = new J48DecisionTreeFactory(defaultValueConfidenceFactor, false); this.panel = new JXPanel(); this.panel.setLayout(new BorderLayout()); this.slider = new JSlider(); this.slider.setBorder(new TitledBorder("Confidence factor")); this.slider.setOpaque(false); this.slider.setMaximum((int) (defaultValueConfidenceFactor * 100)); this.slider.setValue((int) (defaultValueConfidenceFactor * 100)); this.slider.setMinimum(1); this.slider.setMinorTickSpacing(1); this.slider.setMajorTickSpacing(10); this.slider.setPaintTicks(true); this.slider.setPaintLabels(true); this.panel.add(this.slider, BorderLayout.SOUTH); this.attrSelectionCombo = new JComboBox(); this.attrSelectionCombo.setBorder(new TitledBorder("Attribute used to split")); final JXPanel cmdPanel = new JXPanel(); cmdPanel.setLayout(new BorderLayout()); cmdPanel.add(this.attrSelectionCombo, BorderLayout.CENTER); this.withWeightCheckBox = new JCheckBox("Weighted"); this.withWeightCheckBox.setBorder(new TitledBorder("With weight")); cmdPanel.add(this.withWeightCheckBox, BorderLayout.EAST); this.panel.add(cmdPanel, BorderLayout.NORTH); }
From source file:edu.harvard.mcz.imagecapture.VerbatimToTranscribeDialog.java
/** * Create the dialog.//from w w w .jav a 2 s . c o m */ public VerbatimToTranscribeDialog() { setDefaultCloseOperation(DISPOSE_ON_CLOSE); setBounds(100, 100, 726, 557); getContentPane().setLayout(new BorderLayout()); contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); getContentPane().add(contentPanel, BorderLayout.CENTER); contentPanel.setLayout(new BorderLayout(0, 0)); { table = new JTable(); SpecimenLifeCycle sls = new SpecimenLifeCycle(); GenusSpeciesCountTableModel model = new GenusSpeciesCountTableModel(sls.countSpecimensForVerbatim()); table.setModel(model); table.setDefaultRenderer(GenusSpeciesCount.class, new ButtonRenderer("Transcribe")); table.setDefaultEditor(GenusSpeciesCount.class, new ButtonEditor(ButtonEditor.OPEN_SPECIMEN_VERBATIM, this)); contentPanel.add(table, BorderLayout.CENTER); } { JPanel buttonPane = new JPanel(); buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); getContentPane().add(buttonPane, BorderLayout.SOUTH); { JButton cancelButton = new JButton("Close"); cancelButton.setActionCommand("Close"); cancelButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { setVisible(false); } }); buttonPane.add(cancelButton); } } }