This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
When adding JComboBox into frame, the model by default contains Strings but the variable is generated as private javax.swing.JComboBox<String> jComboBox1; so the line jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); is not correct (on jdk < 1.8) Product Version: NetBeans IDE Dev (Build 201509170002) Updates: Updates available Java: 1.8.0_60; Java HotSpot(TM) 64-Bit Server VM 25.60-b23 Runtime: Java(TM) SE Runtime Environment 1.8.0_60-b27 System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb) User directory: C:\Users\jprox\AppData\Roaming\NetBeans\dev Cache directory: C:\Users\jprox\AppData\Local\NetBeans\Cache\dev
Thanks for catching this. So we need to initialize comboboxes with String type. http://hg.netbeans.org/jet-main/rev/984dfff7be37
Integrated into 'main-silver', will be available in build *201509230002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/984dfff7be37 User: Tomas Pavek <tpavek@netbeans.org> Log: #255402: in Java 7 combobox can't use Object type parameter with model using array of Strings