< prev index next >
src/demo/share/jfc/Stylepad/Stylepad.java
Print this page
@@ -253,12 +253,12 @@
void initDocument(DefaultStyledDocument doc, StyleContext sc) {
Wonderland w = new Wonderland(doc, sc);
w.loadDocument();
}
- JComboBox createFamilyChoices() {
- JComboBox b = new JComboBox();
+ JComboBox<String> createFamilyChoices() {
+ JComboBox<String> b = new JComboBox<>();
String[] fontNames = GraphicsEnvironment.getLocalGraphicsEnvironment().
getAvailableFontFamilyNames();
for (String fontName : fontNames) {
b.addItem(fontName);
}
< prev index next >