List of usage examples for java.awt BorderLayout WEST
String WEST
To view the source code for java.awt BorderLayout WEST.
Click Source Link
From source file:jhplot.gui.GHPanel.java
/** * Create a panel with graphics. By default, all margins have size of 10 * pixels. Background color is white. Initialization of JHPLot classes are * done here./*from www . j a v a2 s .c o m*/ * * @param Width * in pixels * @param Height * in pixels */ public GHPanel(int Width, int Height) { System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.NoOpLog"); CanvasPanel = new JPanel(); // build export file tipes // list = new List<ExportFileType>(); // List<ExportFileType> list = ExportFileType.getExportFileTypes(); // addAllExportFileTypes(); this.Width = Width; this.Height = Height; // what if the screen size is smaller? Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); int Sheight = screenSize.height; int Swidth = screenSize.width; if (Swidth < this.Width || Sheight < this.Height) { this.Width = (int) (0.5 * Swidth); this.Height = (int) (0.5 * Sheight); } CanvasPanel.addComponentListener(this); CanvasPanel.setPreferredSize(new Dimension(Width, Height)); CanvasPanel.setMinimumSize(new Dimension(20, 20)); leftSize = (int) (Width * 0.025); rightSize = (int) (Width * 0.025); bottomSize = (int) (Height * 0.025); topSize = (int) (Height * 0.025); backMargin = Color.white; mainPanel = new JPanel(); topPanel = new GHMargin(this, "Top"); // left panel topPanel.setGBackground(backMargin); topPanel.setGRecBackground(backMargin); leftPanel = new GHMargin(this, "Left"); // left panel leftPanel.setGBackground(backMargin); leftPanel.setGRecBackground(backMargin); rightPanel = new GHMargin(this, "Right"); // right panel rightPanel.setGBackground(backMargin); rightPanel.setGRecBackground(backMargin); bottomPanel = new GHMargin(this, "Bottom"); // buttom panel bottomPanel.setGBackground(backMargin); rightPanel.setGRecBackground(backMargin); leftPanel.setSizeMargin(leftSize, Height); rightPanel.setSizeMargin(rightSize, Height); bottomPanel.setSizeMargin(Width, bottomSize); topPanel.setSizeMargin(Width, topSize); // invert to GridLayout(); Gaps are zero mainPanel.setBackground(Color.white); mainPanel.setBorder(BorderFactory.createEmptyBorder()); CanvasPanel.setLayout(new BorderLayout()); CanvasPanel.add(mainPanel, BorderLayout.CENTER); CanvasPanel.add(leftPanel, BorderLayout.WEST); CanvasPanel.add(rightPanel, BorderLayout.EAST); CanvasPanel.add(bottomPanel, BorderLayout.SOUTH); CanvasPanel.add(topPanel, BorderLayout.NORTH); // no boarder CanvasPanel.setBorder(BorderFactory.createEmptyBorder()); // initialisation JHPlot.init(); }
From source file:org.openflexo.technologyadapter.excel.view.ExcelSheetView.java
public ExcelSheetView(ExcelSheet sheet, FlexoController controller) { super(new BorderLayout()); this.sheet = sheet; this.controller = controller; tableModel = new ExcelSheetTableModel(); table = new MultiSpanCellTable(tableModel); table.setBackground(Color.WHITE); table.setShowGrid(true);//www . j a v a 2s .c om table.setGridColor(Color.LIGHT_GRAY); table.setRowMargin(0); table.getColumnModel().setColumnMargin(0); for (int i = 0; i < tableModel.getColumnCount(); i++) { TableColumn col = table.getColumnModel().getColumn(i); if (i == 0) { col.setWidth(25); col.setPreferredWidth(25); col.setMinWidth(25); col.setMaxWidth(100); // col.setResizable(false); col.setHeaderValue(null); } else { col.setWidth(sheet.getSheet().getColumnWidth(i - 1) / 40); col.setPreferredWidth(sheet.getSheet().getColumnWidth(i - 1) / 40); col.setHeaderValue("" + Character.toChars(i + 64)[0]); } } table.setDefaultRenderer(Object.class, new ExcelSheetCellRenderer()); table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); add(new JScrollPane(table), BorderLayout.CENTER); cellIdentifier = new JTextField(6); cellIdentifier.setEditable(false); cellIdentifier.setHorizontalAlignment(SwingConstants.CENTER); cellValue = new JTextField(); cellValue.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { valueEditedForSelectedCell(cellValue.getText()); } }); /*cellValue.getDocument().addDocumentListener(new DocumentListener() { @Override public void removeUpdate(DocumentEvent e) { valueEditedForSelectedCell(cellValue.getText()); } @Override public void insertUpdate(DocumentEvent e) { valueEditedForSelectedCell(cellValue.getText()); } @Override public void changedUpdate(DocumentEvent e) { valueEditedForSelectedCell(cellValue.getText()); } });*/ JPanel topPanel = new JPanel(new BorderLayout()); topPanel.add(cellIdentifier, BorderLayout.WEST); topPanel.add(cellValue, BorderLayout.CENTER); add(topPanel, BorderLayout.NORTH); table.getSelectionModel().addListSelectionListener(new ListSelectionListener() { @Override public void valueChanged(ListSelectionEvent e) { selectionChanged(); } }); table.getColumnModel().addColumnModelListener(new TableColumnModelListener() { @Override public void columnSelectionChanged(ListSelectionEvent e) { selectionChanged(); } @Override public void columnRemoved(TableColumnModelEvent e) { } @Override public void columnMoved(TableColumnModelEvent e) { } @Override public void columnMarginChanged(ChangeEvent e) { } @Override public void columnAdded(TableColumnModelEvent e) { } }); updateRowHeights(); validate(); /*for (Object p : sheet.getSheet().getWorkbook().getAllPictures()) { System.out.println("Picture: " + p); } System.out.println("class = " + sheet.getSheet().getClass()); if (sheet.getSheet() instanceof HSSFSheet) { List<HSSFShape> shapes = ((HSSFSheet) sheet.getSheet()).getDrawingPatriarch().getChildren(); System.out.println("Prout=" + shapes); for (int i = 0; i < shapes.size(); i++) { System.out.println("hop avec " + shapes.get(i)); if (shapes.get(i) instanceof HSSFPicture) { HSSFPicture pic = (HSSFPicture) shapes.get(i); HSSFPictureData picdata = ((HSSFSheet) sheet.getSheet()).getWorkbook().getAllPictures().get(pic.getPictureIndex()); System.out.println("New picture found : " + pic); System.out.println("Anchor : " + pic.getAnchor()); System.out.println("file extension " + picdata.suggestFileExtension()); // int pictureIndex = this.newSheet.getWorkbook().addPicture( picdata.getData(), picdata.getFormat()); // this.newSheet.createDrawingPatriarch().createPicture((HSSFClientAnchor)pic.getAnchor()r, pictureIndex); } } }*/ }
From source file:org.rdv.ui.ChannelListPanel.java
/** * Create the UI panel that contains the controls to filter the channel list. * // w ww. j a va 2 s. co m * @return the UI component dealing with filtering */ private JComponent createFilterPanel() { JPanel filterPanel = new JPanel(); filterPanel.setLayout(new BorderLayout(5, 5)); filterPanel.setBackground(Color.white); filterPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); JLabel filterIconLabel = new JLabel(DataViewer.getIcon("icons/filter.gif")); filterPanel.add(filterIconLabel, BorderLayout.WEST); filterTextField = new JTextField(); filterTextField.setToolTipText("Enter text here to filter the channel list"); filterTextField.getDocument().addDocumentListener(new DocumentListener() { public void changedUpdate(DocumentEvent e) { treeModel.setFilter(filterTextField.getText()); } public void insertUpdate(DocumentEvent e) { changedUpdate(e); } public void removeUpdate(DocumentEvent e) { changedUpdate(e); } }); filterPanel.add(filterTextField, BorderLayout.CENTER); Action focusFilterAction = new AbstractAction() { /** serialization version identifier */ private static final long serialVersionUID = -2443410059209958411L; public void actionPerformed(ActionEvent e) { filterTextField.requestFocusInWindow(); filterTextField.selectAll(); } }; int modifier = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(); filterTextField.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW) .put(KeyStroke.getKeyStroke(KeyEvent.VK_F, modifier), "focusFilter"); filterTextField.getActionMap().put("focusFilter", focusFilterAction); Action cancelFilterAction = new AbstractAction(null, DataViewer.getIcon("icons/cancel.gif")) { /** serialization version identifier */ private static final long serialVersionUID = 8913797349366699615L; public void actionPerformed(ActionEvent e) { treeModel.setFilter(null); } }; cancelFilterAction.putValue(Action.SHORT_DESCRIPTION, "Cancel filter"); filterTextField.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), "cancelFilter"); filterTextField.getActionMap().put("cancelFilter", cancelFilterAction); clearFilterButton = new JButton(cancelFilterAction); clearFilterButton.setBorderPainted(false); clearFilterButton.setVisible(false); filterPanel.add(clearFilterButton, BorderLayout.EAST); return filterPanel; }
From source file:org.ut.biolab.medsavant.client.view.genetics.GeneticsTablePage.java
/** * Splits the main table view into an upper and lower section. * The upper section contains the main table pane, and the lower section * contains the given JPanel. /* w ww . j a v a 2s . c o m*/ */ /* @Override public void splitScreen(JPanel p){ split = true; JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, tablePanel, p); splitPane.setResizeWeight(1); outerTablePanel.removeAll(); outerTablePanel.add(splitPane); outerTablePanel.revalidate(); outerTablePanel.repaint(); } @Override public void unsplitScreen(){ split = false; outerTablePanel.removeAll(); outerTablePanel.add(tablePanel); outerTablePanel.revalidate(); outerTablePanel.repaint(); } @Override public boolean isSplit(){ return split; }*/ @Override public JPanel getView() { try { if (view == null) { view = new JPanel(); view.setLayout(new BorderLayout()); view.add(new WaitPanel("Preparing Spreadsheet...")); Runnable prepareViewInBackground = new Runnable() { @Override public void run() { try { LOG.debug("Running thread prepareViewINBackground!"); final JPanel tmpView = new JPanel(); tmpView.setLayout(new BorderLayout()); tablePanel = new TablePanel(pageName); SplitScreenPanel ssp = new SplitScreenPanel(tablePanel); final ComprehensiveInspector inspectorPanel = new ComprehensiveInspector(true, true, true, true, true, true, true, ssp); inspectorPanel.addSelectionListener(new Listener<Object>() { @Override public void handleEvent(Object event) { clearSelection(); } }); TablePanel.addVariantSelectionChangedListener(new Listener<VariantRecord>() { @Override public void handleEvent(final VariantRecord r) { inspectorPanel.setVariantRecord(r); } }); LOG.debug("Constructing detailView"); detailView = new PeekingPanel("Detail", BorderLayout.WEST, inspectorPanel, false, StaticInspectorPanel.INSPECTOR_WIDTH); detailView.setToggleBarVisible(false); tmpView.add(detailView, BorderLayout.EAST); //outerTablePanel = new JPanel(); //outerTablePanel.setLayout(new BoxLayout(outerTablePanel, BoxLayout.Y_AXIS)); //outerTablePanel.add(tablePanel); //tmpView.add(outerTablePanel, BorderLayout.CENTER); tmpView.add(ssp, BorderLayout.CENTER); SwingUtilities.invokeLater(new Runnable() { @Override public void run() { view.removeAll(); view.add(tmpView, BorderLayout.CENTER); view.updateUI(); } }); } catch (Exception ex) { LOG.error(ex); System.out.println("Caught spreadsheet loading error: " + ex); ex.printStackTrace(); view.removeAll(); WaitPanel p = new WaitPanel("Error loading Spreadsheet"); p.setComplete(); view.add(p); } } }; viewPreparationThread = new Thread(prepareViewInBackground); viewPreparationThread.start(); } return view; } catch (Exception ex) { ClientMiscUtils.reportError("Error generating genome view: %s", ex); } return view; }
From source file:com.floreantpos.ui.dialog.DiscountSelectionDialog.java
private void createCouponSearchPanel() { itemSearchPanel = new JPanel(new BorderLayout(5, 5)); PosButton btnSearch = new PosButton("..."); btnSearch.setPreferredSize(new Dimension(60, 40)); JLabel lblCoupon = new JLabel("Enter Coupon Number"); txtSearchItem = new JTextField(); txtSearchItem.addFocusListener(new FocusListener() { @Override//from w ww . j a v a 2 s.c o m public void focusLost(FocusEvent e) { txtSearchItem.setText("Scan barcode"); txtSearchItem.setForeground(Color.gray); } @Override public void focusGained(FocusEvent e) { txtSearchItem.setForeground(Color.black); txtSearchItem.setText(""); } }); txtSearchItem.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { if (txtSearchItem.getText().equals("")) { POSMessageDialog.showMessage("Please enter coupon number or barcode "); return; } if (!addCouponByBarcode(txtSearchItem.getText())) { addCouponById(txtSearchItem.getText()); } txtSearchItem.setText(""); } }); btnSearch.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { ItemSearchDialog dialog = new ItemSearchDialog(Application.getPosWindow()); dialog.setTitle("Search Coupon"); dialog.pack(); dialog.open(); if (dialog.isCanceled()) { return; } txtSearchItem.requestFocus(); if (!addCouponByBarcode(dialog.getValue())) { if (!addCouponById(dialog.getValue())) { POSMessageDialog.showError(Application.getPosWindow(), "Coupon not found"); } } } }); itemSearchPanel.add(lblCoupon, BorderLayout.WEST); itemSearchPanel.add(txtSearchItem); itemSearchPanel.add(btnSearch, BorderLayout.EAST); }
From source file:eu.europeana.sip.gui.SipCreatorGUI.java
public SipCreatorGUI() throws FileStoreException { super("Delving SIP Creator"); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); MetadataModel metadataModel = loadMetadataModel(); File fileStoreDirectory = getFileStoreDirectory(); FileStore fileStore = new FileStoreImpl(fileStoreDirectory, metadataModel); GroovyCodeResource groovyCodeResource = new GroovyCodeResource(); this.dataSetListModel = new DataSetListModel(new DataSetListModel.ConnectedStatus() { @Override/*from www .j a v a 2s . co m*/ public boolean isConnected() { return connectedBox.isSelected(); } }); this.dataSetList = new JList(dataSetListModel); this.sipModel = new SipModel(fileStore, metadataModel, groovyCodeResource, new PopupExceptionHandler()); this.dataSetClient = new DataSetClient(new DataSetClient.Context() { @Override public String getServerUrl() { return sipModel.getAppConfigModel().getServerUrl(); } @Override public String getAccessKey() { return sipModel.getAppConfigModel().getAccessKey(); } @Override public void setInfo(DataSetInfo dataSetInfo) { dataSetListModel.setDataSetInfo(dataSetInfo); dataSetActions.setDataSetInfo(dataSetInfo); } @Override public void setList(List<DataSetInfo> list) { if (list != null) { Set<String> untouched = dataSetListModel.setDataSetInfoList(list); if (!untouched.isEmpty()) { dataSetActions.setUntouched(untouched); } for (DataSetInfo dataSetInfo : list) { dataSetActions.setDataSetInfo(dataSetInfo); } } else { log.warn("received empty list from the server"); } } @Override public void tellUser(String message) { sipModel.getUserNotifier().tellUser(message); } @Override public void disconnected() { connectedBox.setSelected(false); sipModel.getUserNotifier().tellUser(String.format("Disconnected from Repository at %s", sipModel.getAppConfigModel().getServerHostPort())); } }); dataSetActions = new DataSetActions(this, sipModel, dataSetClient, new Runnable() { @Override public void run() { dataSetListModel.clear(); for (FileStore.DataSetStore dataSetStore : sipModel.getFileStore().getDataSetStores().values()) { dataSetListModel.setDataSetStore(dataSetStore); } dataSetListModel.setPattern(filter.getText()); } }); setJMenuBar(createMenuBar()); JPanel main = new JPanel(new BorderLayout(MARGIN, MARGIN)); main.setBorder(BorderFactory.createEmptyBorder(MARGIN, MARGIN, MARGIN, MARGIN)); JPanel north = new JPanel(new BorderLayout()); north.setBorder( BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(MARGIN, MARGIN, 0, MARGIN), BorderFactory.createRaisedBevelBorder())); titleLabel.setOpaque(true); titleLabel.setFont(new Font("Sans", Font.BOLD, 24)); JLabel northRight = new JLabel(new ImageIcon(getClass().getResource("/delving-logo.png"))); north.add(createFilterPanel(), BorderLayout.WEST); north.add(titleLabel, BorderLayout.CENTER); north.add(northRight, BorderLayout.EAST); getContentPane().add(north, BorderLayout.NORTH); getContentPane().add(main, BorderLayout.CENTER); JPanel south = new JPanel(new GridLayout(1, 0)); south.add(createConnectPanel()); south.add(createFinishedPanel()); getContentPane().add(south, BorderLayout.SOUTH); main.add(createList(), BorderLayout.CENTER); main.add(dataSetActions.getPanel(), BorderLayout.EAST); setSize(SIZE); setLocation((Toolkit.getDefaultToolkit().getScreenSize().width - SIZE.width) / 2, (Toolkit.getDefaultToolkit().getScreenSize().height - SIZE.height) / 2); SwingUtilities.invokeLater(new Runnable() { @Override public void run() { for (FileStore.DataSetStore dataSetStore : sipModel.getFileStore().getDataSetStores().values()) { dataSetListModel.setDataSetStore(dataSetStore); } } }); }
From source file:gg.pistol.sweeper.gui.component.DecoratedPanel.java
private void addSideImage() { JPanel panel = createVerticalPanel(); panel.add(new JLabel(sideImage)); panel.add(Box.createVerticalGlue()); if (ComponentOrientation.getOrientation(i18n.getLocale()).isLeftToRight()) { panel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, border)); add(panel, BorderLayout.WEST); } else {//from w ww. ja va2 s .com panel.setBorder(BorderFactory.createEmptyBorder(0, border, 0, 0)); add(panel, BorderLayout.EAST); } }
From source file:org.jimcat.gui.perspective.boards.cards.Card.java
/** * build up swing componets//from ww w . j a v a 2 s. co m */ private void initComponents() { setOpaque(false); setBorder(new RoundedShadowBorder(15)); setLayout(new BorderLayout()); setBackground(new Color(255, 140, 0, 100)); viewer = new FramedImageViewer(); viewer.setGraphicSize(new Dimension(140, 140)); add(viewer, orientation.getBorderLayoutConstant()); JLabel tmp = null; // General info list JPanel labelPanel = new JPanel(); labelPanel.setOpaque(false); labelPanel.setBorder(new EmptyBorder(0, 0, 0, 10)); labelPanel.setLayout(new GridLayout(0, 1)); JPanel contentPanel = new JPanel(); contentPanel.setOpaque(false); contentPanel.setLayout(new GridLayout(0, 1)); tmp = new JLabel("Title"); tmp.setFont(labelFont); labelPanel.add(tmp); tmp.setOpaque(false); contentPanel.add(title); tmp = new JLabel("Date Taken"); tmp.setFont(labelFont); labelPanel.add(tmp); tmp.setOpaque(false); taken = new JLabel(); contentPanel.add(taken); tmp = new JLabel("Dimension"); tmp.setFont(labelFont); tmp.setOpaque(false); labelPanel.add(tmp); dimension = new JLabel(""); contentPanel.add(dimension); tmp = new JLabel("Size"); tmp.setFont(labelFont); tmp.setOpaque(false); labelPanel.add(tmp); size = new JLabel(""); contentPanel.add(size); tmp = new JLabel("File path"); tmp.setFont(labelFont); tmp.setOpaque(false); labelPanel.add(tmp); path = new JLabel(""); path.setToolTipText(""); path.addMouseListener(new MouseEventsToCardGrandParentShifter()); contentPanel.add(path); tmp = new JLabel("Rating"); tmp.setFont(labelFont); tmp.setOpaque(false); labelPanel.add(tmp); rating = new RatingEditor(); JPanel ratingWrapper = new JPanel(new BorderLayout()); ratingWrapper.setOpaque(false); ratingWrapper.add(rating, BorderLayout.WEST); contentPanel.add(ratingWrapper); // free line tmp = new JLabel(); tmp.setOpaque(false); labelPanel.add(tmp); tmp = new JLabel(); contentPanel.add(tmp); // tags tmp = new JLabel("Tags"); tmp.setFont(labelFont); tmp.setOpaque(false); labelPanel.add(tmp); tags = new JLabel(""); tags.setToolTipText(""); tags.addMouseListener(new MouseEventsToCardGrandParentShifter()); contentPanel.add(tags); // albums tmp = new JLabel("Albums"); tmp.setFont(labelFont); tmp.setOpaque(false); labelPanel.add(tmp); albums = new JLabel(""); albums.setToolTipText(""); albums.addMouseListener(new MouseEventsToCardGrandParentShifter()); contentPanel.add(albums); JPanel info = new JPanel(); info.setOpaque(false); info.setLayout(new BorderLayout()); info.setBorder(new EmptyBorder(20, 10, 10, 0)); info.add(labelPanel, BorderLayout.WEST); info.add(contentPanel, BorderLayout.CENTER); JPanel infoHolder = new JPanel(); infoHolder.setOpaque(false); infoHolder.setLayout(new BorderLayout()); infoHolder.add(info, BorderLayout.NORTH); add(infoHolder, BorderLayout.CENTER); }
From source file:org.f2o.absurdum.puck.gui.PuckFrame.java
/** * Call if skin has been changed, to refresh the icons. *//*from w ww . ja v a 2s .c o m*/ private void refreshToolBar() { if (tools != null) { tools.unloadActiveTool(); left.remove(tools); } tools = new PuckToolBar(graphPanel, propPanel, this); left.add(tools, BorderLayout.WEST); left.revalidate(); }
From source file:org.piraso.ui.api.views.BaseEntryViewTopComponent.java
/** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor./*from w w w. j a v a 2 s.c om*/ */ // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jSeparator1 = new javax.swing.JToolBar.Separator(); buttonGroup1 = new javax.swing.ButtonGroup(); btnPin = new javax.swing.JToggleButton(); toolbar = new javax.swing.JToolBar(); toolbar2 = new javax.swing.JToolBar(); btnPin.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/piraso/ui/api/icons/pin_small.png"))); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(btnPin, org.openide.util.NbBundle .getMessage(BaseEntryViewTopComponent.class, "BaseEntryViewTopComponent.btnPin.text")); // NOI18N btnPin.setToolTipText(org.openide.util.NbBundle.getMessage(BaseEntryViewTopComponent.class, "BaseEntryViewTopComponent.btnPin.toolTipText")); // NOI18N btnPin.setFocusable(false); btnPin.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); btnPin.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); btnPin.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnPinActionPerformed(evt); } }); setLayout(new java.awt.BorderLayout()); toolbar.setBackground(new java.awt.Color(226, 226, 226)); toolbar.setFloatable(false); toolbar.setRollover(true); add(toolbar, java.awt.BorderLayout.NORTH); toolbar2.setBackground(new java.awt.Color(226, 226, 226)); toolbar2.setFloatable(false); toolbar2.setOrientation(1); toolbar2.setRollover(true); toolbar2.setVisible(false); add(toolbar2, java.awt.BorderLayout.WEST); }