0
Ich habe dieses Programm und ich möchte ein Hintergrundbild zu meinem comboBox
hinzufügen. Ich habe viele Methoden und ich kann es nicht machen, kann jemand helfen?Hinzufügen von Hintergrundbild zu JComboBox
class myClass
{
public static void main(String args[])
{
JFrame myFrame = new JFrame();
myFrame.setBounds(500,500,500,500);
myFrame.setLayout(null);
myFrame.setVisible(true);
JComboBox myComboBox = new JComboBox();
myComboBox.setBounds(100,100,100,20);
myComboBox.add("item1");
myComboBox.add("item2");
myComboBox.setVisible(true);
Image comboBoxImage = new ImageIcon(
myClass.class.getResources("/Image.png")).getImage();
}
}
wie die comboBoxImage
als Hintergrund der myComboBox
Combobox setzen?
Sie sind sehr gut! Danke – darkagandal