Creating JComboBox using Java Swing


Creating JComboBox using Java Swing: https://youtu.be/BH7hulH_hJ4 ________________________________________________ How to make JComboBox

package Test;


import javax.swing.*;

public class Test{

public static void main(String[] args){

JFrame frame = new JFrame("Test Frame");

frame.setBounds(600,150,500,300);

frame.setLayout(null);


String fruits[] = {"Cherry", "Apple", "Melon", "Banana"};


JComboBox combobox = new JComboBox(fruits);

combobox.setBounds(10,20,100,20);


frame.add(combobox);

frame.setVisible(true);

}

}

________________________________________________

Dark Hers

https://darkhers.blogspot.com

YouTube

https://youtube.com/@darkhers

Instagram

https://instagram.com/darkhers

Facebook

https://www.facebook.com/darkhers

TikTok

https://www.tiktok.com/@darkhers

Pinterest

https://www.pinterest.co.uk/darkhers

Twitter

https://twitter.com/Dark_Hers


Comments

Popular Posts