how do I fix illegal start of expression in java?

            import java.awt.*;
            import java.io.*;
            import java.util.*;
            import java.text.*;
            import javax.swing.table.*;
            import javax.swing.*;
            import java.awt.event.*;
            import java.awt.event.ActionListener;
            import javax.swing.JComponent;

            public class QuickTableTest {

                private static class myCombo{

                    private static void setSelectedItem(Object value) {
                        throw new UnsupportedOperationException("Not supported yet."); 
                    }

                    private static Object getSelectedItem() {
                        throw new UnsupportedOperationException("Not supported yet."); 
                    }

                    public myCombo() {
                    }
                }

            }
            public interface CellComponent{
                //CellComponent is used to create user defined editor renderer for quicktable.

                class MyCell implements CellComponent{
                    {
                        JCombobox myCombo = new JCombobox();
                        MyCell();
                        {
                            myCombo.addItem("Alive");
                            myCombo.addItem("Dead");
                            myCombo.addItem("Leave");
                        }

                        public void setValue(Object value)
                        {
                            myCombo.setSelectedItem(value);
                            //handle the case if null is passed
                        }

                        public Object getValue()
                        {
                            return myCombo.getSelectedItem();
                            //return "" if nothing is selected
                        }

                        public JComponent getComponent()
                        {
                            JComponent mycombo = null;
                            return mycombo;
                        }

                        public void addActionListener(ActionListener listener)
                        {
                            mycombo.addActionListener(listener)
                        }

                        private MyCell() {
                            throw new UnsupportedOperationException("Not supported yet."); 
                        }

                        private MyCell() {
                            throw new UnsupportedOperationException("Not supported yet.");
                        }

                        private MyCell() {
                            throw new UnsupportedOperationException("Not supported yet."); 
                        }
                    }
                }
                yourQuickTable.getColumn(1).setUserCellEditor(new 

                MyCell());

            }
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories