adding values in jcombobox dynamically from database

I have 3 radio buttons. If button 1 is selected then i want to show only 2 values from the database, if I select other 2, then I want to show 5 values. I will do this by generating a event method for the radio button. The problem is to select values from the database and add it to the combobox. I am using xampp for the database. Thank you


To modify UI components use UIThreads EventQueue.invokeLater or SwingUtilities.invokeLater. Look this sample code:

SwingUtilities.invokeLater(new Runnable() {

        public void run() {
            try {
                Socket socket = new Socket("", 6677);

                ObjectOutputStream out = new ObjectOutputStream(socket.getOutputStream());
                ObjectInputStream in = new ObjectInputStream(socket.getInputStream());


                ArrayList<String> data =(ArrayList<String>)in.readObject();
                if (!data.isEmpty()){
                    for(String s:data){

            } catch (Exception e) {

Need Your Help

Increment value in mysql update query

php mysql sql sql-update

I have made this code for giving out +1 point, but it doesn't work properly.

MVC files organization in folders


I'm building a web application using ASP.NET MVC and i have a question about the files organization.