java Programming Glossary: border
Add a complex image in the panel, with buttons around it in one customized user interface http://stackoverflow.com/questions/10861852/add-a-complex-image-in-the-panel-with-buttons-around-it-in-one-customized-user import javax.swing. import javax.swing.border.Border public class NewPanel extends JPanel private Image imageGui.. catch IOException e e.printStackTrace System.err Border border BorderFactory.createEmptyBorder 11 11 11 11 setOpaque true setBorder.. 11 11 11 11 setOpaque true setBorder border setFocusable true setSize getPreferredSize revalidate repaint..
non resizable window border and positioning http://stackoverflow.com/questions/12529200/non-resizable-window-border-and-positioning resizable window border and positioning If i create non resizable JFrames and windows.. setLocation does not seem to take account of the window border correctly. In the following code I would expect the second frame.. be positioned to the right of the first frame instead the borders are overlapping. If Aero is disabled or if I remove the calls..
Example images for code and mark-up Q&As http://stackoverflow.com/questions/19209650/example-images-for-code-and-mark-up-qas Categories gif animated gif Solid BG Animated dashed border as seen in this answer . Details 100x30 px with filled BG no..
What does it mean: The serializable class does not declare a static final serialVersionUID field? http://stackoverflow.com/questions/2288937/what-does-it-mean-the-serializable-class-does-not-declare-a-static-final-serial public HelloWorldSwing ... Set initial text scrolling and border. m_resultArea.setText Enter more text to see scrollbars JScrollPane..
How to rotate an image gradually in Swing? http://stackoverflow.com/questions/3405799/how-to-rotate-an-image-gradually-in-swing import javax.swing.JPanel import javax.swing.border.TitledBorder public class CrossingPanelSSCE extends JPanel private.. Dimension 50 50 this.setBackground Color.red TitledBorder border BorderFactory.createTitledBorder image this.setLayout new FlowLayout.. import javax.swing.SwingUtilities import javax.swing.border.TitledBorder import application.Robot2 public class VisualizationPanelSSCE..
How to create dynamic JSF 1.2 form fields http://stackoverflow.com/questions/3510614/how-to-create-dynamic-jsf-1-2-form-fields a h2 div class tightPanel fieldset class fieldSet style border 0 margin bottom 0.7em ui repeat value # sdf.fields var df ..
uploading of pdf file http://stackoverflow.com/questions/5038798/uploading-of-pdf-file ACTION uploadfile.html METHOD POST br br br center table border 2 tr center td colspan 2 p align center B PROGRAM FOR UPLOADING.. endPos startPos fileOut.flush fileOut.close Br table border 2 tr td b You have successfully upload the file by the name..
How to add JTable in JPanel http://stackoverflow.com/questions/5621338/how-to-add-jtable-in-jpanel the layouts that are explicitly set are shown as a titled border for the panel on which they are used. Notable aspects of the.. javax.swing.table.DefaultTableModel import javax.swing.border.TitledBorder A short example of a nested layout that can change..
List of useful environment settings in Java http://stackoverflow.com/questions/7585699/list-of-useful-environment-settings-in-java import java.awt. import javax.swing. import javax.swing.border.EmptyBorder import java.util. import java.security. A small.. JTabbedPane StringBuffer sb String header html body table border 1 width 100 sb new StringBuffer header Properties prop System.getProperties.. sb.toString Locale.getDefault int border 5 JPanel p new JPanel new BorderLayout p.setBorder new EmptyBorder..
Can I have a JTabbedPane with a JMenuBar? http://stackoverflow.com/questions/9729692/can-i-have-a-jtabbedpane-with-a-jmenubar set a some Borders for JMenuBar e.g. raised etchech line border crazy and dirty hack from code import java.awt.ComponentOrientation..
Add a complex image in the panel, with buttons around it in one customized user interface http://stackoverflow.com/questions/10861852/add-a-complex-image-in-the-panel-with-buttons-around-it-in-one-customized-user final JButton ptzLeft new JButton masterPanel.add ptzLeft BorderLayout.WEST Row 2 final JButton ptzRight new JButton masterPanel.add.. JButton ptzRight new JButton masterPanel.add ptzRight BorderLayout.CENTER Row 3 final JButton ptzUp new JButton ^ masterPanel.add.. 3 final JButton ptzUp new JButton ^ masterPanel.add ptzUp BorderLayout.WEST Row 4 final JButton ptzDown new JButton down masterPanel.add..
Drawing JTable rows and columns on a Panel http://stackoverflow.com/questions/12662373/drawing-jtable-rows-and-columns-on-a-panel java.util.HashMap import java.util.Map import javax.swing.BorderFactory import javax.swing.JComboBox import javax.swing.JFrame.. .toString table.setRowHeight fontSize setBorder new Font Serif Font.BOLD fontSize table.setFont new Font Serif.. table panel.repaint table.revalidate public void setBorder Font f BorderCellRenderer cellRenderer new BorderCellRenderer..
ActionListener for JLabel http://stackoverflow.com/questions/13866839/actionlistener-for-jlabel java.awt.Color import java.awt.Cursor import java.awt.BorderLayout import java.awt.GridLayout import java.awt.event. import.. javax.swing.JOptionPane import javax.swing.border.MatteBorder import javax.swing.border.Border import java.net.URI import.. javax.swing.border.MatteBorder import javax.swing.border.Border import java.net.URI import java.io.File A Java 1.6 LinkLabel..
how can you make a progress bar without using JProgressBar? http://stackoverflow.com/questions/14036173/how-can-you-make-a-progress-bar-without-using-jprogressbar new Color 0x736a60 private static final Color disabledBorderColor new Color 0xbebebe private static final Composite transparent.. w stringW PREFERRED_PERCENT_STRING_MARGIN_WIDTH Control Border g2d.setColor isEnabled borderColor disabledBorderColor g2d.drawLine.. Control Border g2d.setColor isEnabled borderColor disabledBorderColor g2d.drawLine 1 0 w 1 0 g2d.drawLine 1 h w 1 h g2d.drawLine..
Border with rounded corners & transparency http://stackoverflow.com/questions/15025092/border-with-rounded-corners-transparency with rounded corners transparency The following screenshot.. The following screenshot shows a test of TextBubbleBorder 1 . I would like to make the corners of the component that are.. javax.swing. import javax.swing.border. public class BorderTest public static void main String args Runnable r new Runnable..
How to draw grid using swing class Java and detect mouse position when click and drag http://stackoverflow.com/questions/15421708/how-to-draw-grid-using-swing-class-java-and-detect-mouse-position-when-click-and to monitor which cell is highlighted. import java.awt.BorderLayout import java.awt.Color import java.awt.Dimension import.. JFrame.EXIT_ON_CLOSE frame.setLayout new BorderLayout frame.add new TestPane frame.pack frame.setLocationRelativeTo.. and managed the work load itself instead. import java.awt.BorderLayout import java.awt.Color import java.awt.Dimension import..
Java error: cannot find symbol, and can't figure out why http://stackoverflow.com/questions/16447597/java-error-cannot-find-symbol-and-cant-figure-out-why onthoudNaam new OnthoudNaam public Paneel setLayout new BorderLayout using border Layout. setBackground Color.LIGHT_GRAY textvak1.. textvak2.setEditable false Boven new boven add Boven BorderLayout.NORTH add textvak1 BorderLayout.CENTER add textvak2 BorderLayout.SOUTH.. Boven new boven add Boven BorderLayout.NORTH add textvak1 BorderLayout.CENTER add textvak2 BorderLayout.SOUTH public class boven..
How to add support for resizing when using an undecorated JFrame? http://stackoverflow.com/questions/2780780/how-to-add-support-for-resizing-when-using-an-undecorated-jframe on the RootPane and I could use MouseListeners on the Border or the RootPane. Any recommendations import java.awt.Color import.. import javax.swing.JMenuItem import javax.swing.border.LineBorder public class UndecoratedFrame extends JFrame private LineBorder.. public class UndecoratedFrame extends JFrame private LineBorder border new LineBorder Color.BLUE 2 private JMenuBar menuBar..
Java Swing button colors http://stackoverflow.com/questions/3420311/java-swing-button-colors setBackground doesn't read well on some platforms. Using a Border is one alternative a colored panel shown below is another. package..
CellTable with custom Header containing SearchBox and Focus Problem http://stackoverflow.com/questions/6422896/celltable-with-custom-header-containing-searchbox-and-focus-problem FILTER_HEIGHT 32 final private static int BORDER_HEIGHT 2 Border height is for specific css styling your app might have technially..
How to mark JTable cell input as invalid? http://stackoverflow.com/questions/7531513/how-to-mark-jtable-cell-input-as-invalid extends DefaultCellEditor private static final Border red new LineBorder Color.red private static final Border black.. DefaultCellEditor private static final Border red new LineBorder Color.red private static final Border black new LineBorder Color.black.. Border red new LineBorder Color.red private static final Border black new LineBorder Color.black private JTextField textField..
Component painting outside custom border http://stackoverflow.com/questions/8416295/component-painting-outside-custom-border method of a JComponent invokes paintComponent before paintBorder setting the Graphics clip to the RoundRectangle2D shape has.. One approach I considered was obtaining the component's Border object in the paintComponent method. And then casting this object.. import javax.swing.border.AbstractBorder class JRoundedCornerBorder extends AbstractBorder private static..
Layering multiple GlassPane's in a Root Container http://stackoverflow.com/questions/8715807/layering-multiple-glasspanes-in-a-root-container private Random random new Random private final static Border MESSAGE_BORDER new EmptyBorder 10 10 10 10 private JLabel message.. Random private final static Border MESSAGE_BORDER new EmptyBorder 10 10 10 10 private JLabel message new JLabel private ArrayList.. JFrame.EXIT_ON_CLOSE frame.add glass BorderLayout.CENTER frame.setLocation 20 20 frame.pack frame.setVisible..
|