Java:JPanel: Unterschied zwischen den Versionen

Aus Alexander's Wiki
(Die Seite wurde neu angelegt: „<source lang="java5"> import javax.swing.JPanel; import javax.swing.BorderFactory; import javax.swing.border.Border; import javax.swing.border.…“)
 
K
 
Zeile 1: Zeile 1:
[[Kategorie:Java]]
<source lang="java5">
<source lang="java5">
     import javax.swing.JPanel;
     import javax.swing.JPanel;

Aktuelle Version vom 17. Februar 2013, 08:49 Uhr

    import javax.swing.JPanel;
    import javax.swing.BorderFactory;
    import javax.swing.border.Border;
    import javax.swing.border.TitledBorder;

    JPanel myPanel;


Umrandungen innerhalb eines JPanels

    Border lb = BorderFactory.createLineBorder(Color.BLACK, 1);
    TitledBorder border = BorderFactory.createTitledBorder(lb, title);
    border.setTitleFont(border.getTitleFont().deriveFont(14f));
    border.setTitleFont(border.getTitleFont().deriveFont(Font.BOLD));
    border.setTitleColor(Color.BLACK);
    myPanel.setBorder(border);