JComboBox Focus

Hi, I've got 2 problems ....
1) I have a JComboBox. I tried various methods in the JComboBox API to try and change the gray color you get when keep pressing the combo box.
But I cant get rid of it (I mean change it to appear in a different color)
Does any one know how you can do that ?
2) How can I get rid of the focus in a JComboBox when it get the focus.
I mean in buttons there is method call
button.setFocusPainted(false); that do the job
But there are no such method in the combo box. Is there another way ?
Thanking in Advance *2
Shirantha.

You can do the followings:
JTextField txt = (JTextField) getEditor().getEditorComponent();
txt.addFocusListener(new FocusListener() {
focusGained() {
// do highlighting here.
});

Similar Messages

  • JComboBox focus working differently in different environ

    in our application we are requesting focus in a date JComboBox from many places, not all developers are doing it consistantly. What is the best way? We are in test now. Our testers run the Application with Web Start. Some on Windows 2000. Some on Windows XP. The ones on XP ( and an older version of Web Start than I have, v1.2) are seeing the focus go to the little arrow thingy instead of the text area of the combobox when the following line of code is used:
    protected void focusOnDateBeanSection() {
    SwingUtilities.invokeLater(new Runnable() {
    public void run() {
    getMyView().getDateBean().getJEffDateCBX().requestFocusInWindow();
    Any new thoughts on this, searching through older forums, found this:
    getJEffDateCBX().getEditor().getEditorComponent().requestFocusInWindow();
    why couldn't you just do this:
    getJEffDateCBX().getEditor().getTextField().requestFocusInWindow();
    and why not just .requestFocus() ?

    so I'm saying requestFocusInWindow isn't reliable accross platforms either. So should I :
    .getJEffDateCBX().getEditor().getEditorComponent().requestFocusInWindow();
    or
    getJEffDateCBX().getTextField().requestFocusInWindow();

  • JComboBox focus problem

    Hi all,
    I'm using a JComboBox, a JButton and a JTextArea added to a JPanel. What I doing is using the TextArea as a console, the JComboBox to enter commands in (and retrieve old ones) and the JButton to execute entered commands. This works fine except for one thing. After I have executed a command and output has been written to the textarea(console) I want the focus to shift back to the combobox so that the user simply can enter another command. Using requestFocus() the drop down menu part of the combobox receives the focus and not the textfield part.
    I have tried multiple ways of actually accessing the textfield component (combobox.getEditor().getEditorComponent().requestFocus()) to set the caret position to 0 but nothing seems to work.
    Any thoughts or ideas will be appreciated.
    Cheers,
    Marcus

    Try calling transferFocusBackword on your JButton instance. Hope this helps.

  • JTextField input check (errorDialog if invalid) & JComboBox Focus

    I have a JTextfield which does an input check when the JTextField focus listener's focusLost method is called.
    If I loose focus by clicking in on a JComboBox. The check gets done ok and focus is returned appropriately to the JTextField without any problems.
    But if I try to show an errorDialog when the input is incorrect, the focus is returned to the JTextField without any problems, but the JComboBox remains highlighted as though it is still selected!
    I am using sdk 1.4... on a linux box. does anyone know why this happens? and can anyone provide a clean solution to this?
    Thanx,
    Diego Paloschi.

    Hello Kleopatra,
    Here's a little demo:
    import javax.swing.*;
    import javax.swing.event.*;
    public class Debug extends JPanel
    private JTextField t1;
    private JComboBox c1;
    private T1Verifier t1Verifier;
    public void init()
         t1 = new JTextField("20", 10);
         t1.setInputVerifier(new T1Verifier(this));
         String[] s = {"v1","v2","v3"};
         c1 = new JComboBox(s);
         add(t1);
         add(c1);
    public static void main(String s[])
         Debug d = new Debug();
         d.init();
         JFrame f = new JFrame("Debug");
         f.getContentPane().add(d);
         f.setSize(300,300);
         f.setVisible(true);
    class T1Verifier extends InputVerifier
    private Debug debug;
    public T1Verifier(Debug debug)
         this.debug = debug;
    public boolean verify(JComponent input)
         JTextField tf = (JTextField) input;
         float value = Float.parseFloat(tf.getText());
         boolean inRange = (value >= 0) && ( value <= 10);
         return inRange;
    public boolean shouldYieldFocus(JComponent input)
         boolean valid = super.shouldYieldFocus(input);
         JTextField tf = (JTextField) input;
         if ( !valid ) {
         tf.requestFocus();
         JOptionPane d = new JOptionPane();
         d.showMessageDialog(debug, "Out Of Range.", "ERROR" , JOptionPane.ERROR_MESSAGE);
         return valid;
    Even if u comment out the JOptionPane and just make the inputverifier return control to the textfield it still doesn't work! What am I missing? Or how would u doi it?

  • JComboBox.setPopupVisible() and focus

    Hello,
    the following code demonstrates that always when the combobox is editable and the standard focus sequence is modified, a setPopupVisible(true) indeed opens the popup, but it is immediately closed again. Is anything wrong with the code?
    Although there are quite a number of JComboBox bugs in the database, I did not find this one. If it is a bug, of course I would be interested in a workaround.
    Regards
    J�rg
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class Y extends JFrame
      private JComboBox cmb;
      public Y()
      { setSize(300,300);
        setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
        Container cp= getContentPane();
        cp.setLayout(null);
        final JCheckBox cb= new JCheckBox("Combo editable");
        cb.setBounds(80,30,130,20);
        cb.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent e) {
         cmb.setEditable(cb.isSelected());
        final JTextField tf1= new JTextField();
        tf1.setBounds(50,60,60,20);
        tf1.addFocusListener(new FocusAdapter() {
          public void focusLost(FocusEvent evt) {
         if (!tf1.getText().equals("ee")) {
           cmb.requestFocusInWindow(); // Prevents popup to stay open.
           cmb.setPopupVisible(true);
           System.out.println(cmb.isVisible());
        JTextField tf2= new JTextField();
        tf2.setBounds(150,60,60,20);
        tf2.addFocusListener(new FocusAdapter() {
          public void focusLost(FocusEvent evt) {
         cmb.setPopupVisible(true);
        cmb = new JComboBox(new String[]{"Item 1", "Item 2", "Item 3", "Item 4"});
        cmb.setBounds(100,90,50,20);
        cmb.setSelectedIndex(-1);
        System.out.println("LightWeight: "+cmb.isLightWeightPopupEnabled());
        cp.add(cb);
        cp.add(tf1);
        cp.add(tf2);
        cp.add(cmb);
        setVisible(true);
        tf1.requestFocusInWindow();
      public static void main(String args[])
      { java.awt.EventQueue.invokeLater(new Runnable()
        { public void run()
          { new Y();
    }

    Well, there's two things I note. The first is you're printing out the comboBox's visible status, which is always true, when you're probably trying to get the comboBox's popup's visible status.
    The second thing is the cause of your problem. You request focus on the combo box. When it is editable, however, it is the editor component that gets the focus, not the combo box. So, the popup is made visible and then the editor component loses focus because the combo box gets focus, and so the popup is hidden.
    This change does what you want, I think:
        tf1.addFocusListener(new FocusAdapter() {
          public void focusLost(FocusEvent evt) {
        if (!tf1.getText().equals("ee")) {
            if ( cmb.isEditable() )
                cmb.getEditor().getEditorComponent().requestFocusInWindow();
            else
                cmb.requestFocusInWindow(); // Prevents popup to stay open.
          cmb.setPopupVisible(true);
          System.out.println(cmb.isVisible());
        });

  • JComboBox popup list remains open after losing keyboard focus

    Hi,
    I have noticed a strange JComboBox behavior. When you click on the drop down arrow to show the popup list, and then press the Tab key, the keyboard focus moves to the next focusable component, but the popup list remains visible.
    I have included a program that demonstrates the behavior. Run the program, click the drop down arrow, then press the Tab key. The cursor will move into the JTextField but the combo box's popup list is still visible.
    Does anyone know how I can change this???
    Thanks for any help or ideas.
    --Yeath
    import java.awt.*;
    import javax.swing.*;
    import java.util.*;
    public class Test extends JFrame
       public Test()
          super( "Test Application" );
          this.getContentPane().setLayout( new BorderLayout() );
          Box box = Box.createHorizontalBox();
          this.getContentPane().add( box, BorderLayout.CENTER );
          Vector<String> vector = new Vector<String>();
          vector.add( "Item" );
          vector.add( "Another Item" );
          vector.add( "Yet Another Item" );
          JComboBox jcb = new JComboBox( vector );
          jcb.setEditable( true );
          JTextField jtf = new JTextField( 10 );
          box.add( jcb );
          box.add( jtf );
       public static void main( String[] args )
          Test test = new Test();
          test.pack();
          test.setVisible( true );
          test.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
    }

    ran your code on 1.5.0_3, observed problem as stated.
    even though the cursor is merrily blinking in the textfield, you have to click into
    the textfield to dispose the dropdown
    ran your code on 1.4.2_08, no problems at all - tabbing into textfield immediately
    disposed the dropdown
    another example of 'usual' behaviour (involving focus) breaking between 1.4 and 1.5
    the problem is that any workaround now, may itself be broken in future versions

  • How can I surrend the focus of Jcombobox in Jtable?

    There are a jcombobox for each row of a jtable. I can click each cell to choose some value from the item list of jcombobox.
    The problem is, when I import data into the table by changing the values of tablemodel, if some cell still hold the focus, the table won't show the new imported data for this specific cell, but keep the old one. Others cells without focus work well.
    For example, originally I choose a "Monday" from the combobox with focus. When I import new data (by clicking some button), for instance "Tuesday", the new data doesn't show in the focused cell.
    So, how can I surrend the focus of this specific cell to other components, for instance, some button?

    In your action for your button, before you update your table with the imported information do the following:
    if (myTable.isEditing())
        myTable.getCellEditor().stopCellEditing();
    }

  • Interesting Focus II: JComboBox, 2 JLists and 1 Button

    Hi All,
    Another Interesting Keyboard Focus Question:
    What we want to do?
    Let's say we want to build a JComboBox whose popup contains 2 JLists and a button.
    What we would probably want to do is:
    comboBox.setUI(new MyComboBoxUI());
    MyComboBoxUI will extend BasicComboBoxUI and
    ovveride createPopup to return a BasicComboPopup subclass
    which will add the other JList and JButton.
    (One can argue that this is not a JComboBox anymore, but bare with me)
    Does it work?
    This will work great with the Mouse, but with the Keyboard we face a problem:
    After our popup is displayed, The JComboBox Still Has The Focus - Any UP or DOWN Events are really proccessed by the JComboBox which simulates JList navigation...
    This is happening because the popup is not keyboard-focusable (and so do all of its components)
    Where' s the problem?
    We want to be able to:
    1. Press TAB to navigate thru the 3 components
    2. Press UP and DOWN to navigate the two JLists
    3. Press Space to activate the JButton
    Possible solutions:
    1.
    Don't subclass BasicComboPopup and write a ComboPopup which uses a Focusable JWindow.
    Problem: The JComboBox will lose the focus when the popup opens
    2.
    Simulate all the DOWN/UP/TAB/SPACE events to the popup
    Problem: The components are not focusable, hence there is no indication
    of who is the current focused component
    (Might be solved by surrounding the 'focused' component with a border)
    Your thoughts?
    If you haven't fell asleep by now, you are welcomed to share you ideas, Thanks
    Eyal Katz

    Sorry, I don't understand what you are trying to accomplish. However one line did catch my eye.
    This is happening because the popup is not keyboard-focusable The code in the popupPopup() method in the following post might help:
    http://forum.java.sun.com/thread.jspa?threadID=636842

  • Focus with JComboBox? HELP!!!

    How do you set the focus for a JComboBox? When I use the addFocusListener on a JComboBox it does NOT gain or lose any focus. But when applied to a JButton you'll see it gain and lose focus. Is this a bug in java for the JComboBox?
    Here's an example of the usage
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Test extends JApplet {
    MyFocusListener focuslistener = new MyFocusListener();
    JButton button_1 = new JButton("regular button 1");     
    JComboBox combo_2 = new JComboBox(new Object[] { "item1", "item2" } );
         public void init() {
              Container contentPane = getContentPane();
              combo_2.setNextFocusableComponent(button_1);
              button_1.addFocusListener(focuslistener);
    combo_2.addFocusListener(focuslistener); //<--------- Add listener here
              contentPane.setLayout(new FlowLayout());
              contentPane.add(button_1);
              contentPane.add(combo_2);
    class MyFocusListener implements FocusListener
              public void focusGained(FocusEvent e)
                   Object object = e.getSource();
                   System.out.println("OBJECT: " + object);          
              public void focusLost(FocusEvent e)
              System.out.println("Focus lost" + e);

    This is a quick hack to the focuslistener added to a JComboBox. I noticed that inorder to obtain some focus on a JComboBox you must requestFocus on it. Therefore what I do is I requestFocus right after the button has lost focus. Might not be the best thing to do but it's a quick hack.
    Code listed below.
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Test extends JApplet {
    JButton button_1 = new JButton("regular button 1");     
    JComboBox combo_2 = new JComboBox(new Object[] { "item1", "item2" } );
    MyFocusListener focuslistener = new MyFocusListener();
    MyComboListener combolistener = new MyComboListener();
         public void init() {
              Container contentPane = getContentPane();
              combo_2.setNextFocusableComponent(button_1);
    button_1.addFocusListener(focuslistener);
    combo_2.addFocusListener(combolistener);
              contentPane.setLayout(new FlowLayout());
              contentPane.add(button_1);
              contentPane.add(combo_2);
    button_1.requestFocus();
    class MyFocusListener implements FocusListener
              public void focusGained(FocusEvent e)
                   Object object = e.getSource();
                   System.out.println("Button gained Focus");          
              public void focusLost(FocusEvent e)
              System.out.println("Button lost Focus");
    combo_2.requestFocus(); //<------------ This is the trick
    class MyComboListener implements FocusListener
    public void focusGained(FocusEvent e)
                   Object object = e.getSource();
                   System.out.println("COMBO gained Focus");          
              public void focusLost(FocusEvent e)
              System.out.println("COMBO lost Focus");
    }

  • Holding Focus on JCombobox

    Actually I am adding FocusListener in the JTextfield of the JComboBox .In the focus lost event I am holding the focus of the textfield of the combobox unless a condition(i am not explaning right now) fulfills.works fine if TAB key is pressed but when i shift focus to a button then i am able to come out and press the button, which i do not want.

    And what do I have to do with that? I don't know. What are you trying to do?
    I was assuming that you where adding a FocusListener to the combo box, but you never received a focusGained event. Well thats because the combo box doesn't receive focus. It is a compound component consisting of an editor component and a button component. The editor component receives focus, so if you want to trap a focus event you need to add the FocusListener to the editor component.

  • Editable JComboBox in JTable focus issue

    Please look at the sample code below.
    I am using a JComboBox as the editor for a column in the table. When a cell in that column is edited and the user presses enter, the cell is no longer in edit mode. However, the focus is now set on the next component in the scrollpane (which is a textfield).
    If I don't add the textfield and the the table is the only component in the scroll pane, then focus correctly remains on the selected cell.
    When the user exits edit mode, I'd like the table to have focus and for the cell to remain selected. How can I achieve this?
    thanks,
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.table.*;
    import java.util.Calendar;
    import java.util.GregorianCalendar;
    import javax.swing.plaf.basic.*;
    import java.awt.Component;
    import javax.swing.JComboBox;
    import java.util.EventObject;
    import java.awt.event.*;
    import javax.swing.event.*;
    public class TableComboBoxTest extends JFrame {
         protected JTable table;
         public TableComboBoxTest() {
              Container pane = getContentPane();
              pane.setLayout(new BorderLayout());
              MyTableModel model = new MyTableModel();
              table = new JTable(model);
              table.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);
              table.setSurrendersFocusOnKeystroke(true);
              TableColumnModel tcm = table.getColumnModel();
              TableColumn tc = tcm.getColumn(MyTableModel.GENDER);
              tc.setCellEditor(new MyGenderEditor(new JComboBox()));
              tc.setCellRenderer(new MyGenderRenderer());
              JScrollPane jsp = new JScrollPane(table);
              pane.add(jsp, BorderLayout.CENTER);          
              pane.add(new JTextField("focus goes here"), BorderLayout.SOUTH);
         public static void main(String[] args) {
              TableComboBoxTest frame = new TableComboBoxTest();
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              frame.setSize(500, 300);
              frame.setLocationRelativeTo(null);
              frame.setVisible(true);
         public class MyTableModel extends AbstractTableModel {
              public final static int FIRST_NAME = 0;
              public final static int LAST_NAME = 1;
              public final static int DATE_OF_BIRTH = 2;
              public final static int ACCOUNT_BALANCE = 3;
              public final static int GENDER = 4;
              public final static boolean GENDER_MALE = true;
              public final static boolean GENDER_FEMALE = false;
              public final String[] columnNames = {
                   "First Name", "Last Name", "Date of Birth", "Account Balance", "Gender"
              public Object[][] values = {
                        "Clay", "Ashworth",
                        new GregorianCalendar(1962, Calendar.FEBRUARY, 20).getTime(),
                        new Float(12345.67), "three"
                        "Jacob", "Ashworth",
                        new GregorianCalendar(1987, Calendar.JANUARY, 6).getTime(),
                        new Float(23456.78), "three1"
                        "Jordan", "Ashworth",
                        new GregorianCalendar(1989, Calendar.AUGUST, 31).getTime(),
                        new Float(34567.89), "three2"
                        "Evelyn", "Kirk",
                        new GregorianCalendar(1945, Calendar.JANUARY, 16).getTime(),
                        new Float(-456.70), "One"
                        "Belle", "Spyres",
                        new GregorianCalendar(1907, Calendar.AUGUST, 2).getTime(),
                        new Float(567.00), "two"
              public int getRowCount() {
                   return values.length;
              public int getColumnCount() {
                   return values[0].length;
              public Object getValueAt(int row, int column) {
                   return values[row][column];
              public void setValueAt(Object aValue, int r, int c) {
                   values[r][c] = aValue;
              public String getColumnName(int column) {
                   return columnNames[column];
              public boolean isCellEditable(int r, int c) {
                   return c == GENDER;
         public class MyComboUI extends BasicComboBoxUI {
              public JList getList()
                   return listBox;
         public class MyGenderRenderer extends DefaultTableCellRenderer{
              public MyGenderRenderer() {
                   super();
              public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected,
                        boolean hasFocus, int row, int column) {
                   JComboBox box = new JComboBox();
                   box.addItem(value);
                   return box;
         public class MyGenderEditor extends DefaultCellEditor  { // implements CaretListener {
              protected EventListenerList listenerList = new EventListenerList();
              protected ChangeEvent changeEvent = new ChangeEvent(this);
              private JTextField comboBoxEditorTField;
              Object newValue;
              JComboBox _cbox;
              public MyGenderEditor(JComboBox cbox) {
                   super(cbox);
                   _cbox = cbox;
                   comboBoxEditorTField = (JTextField)_cbox.getEditor().getEditorComponent();
                   _cbox.addItem("three");
                   _cbox.addItem("three1");
                   _cbox.addItem("three2");
                   _cbox.addItem("One");
                   _cbox.addItem("two");
                   _cbox.setEditable(true);
                   _cbox.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent event) {
                             System.out.println("\nactionPerformed ");
                             fireEditingStopped();
              public void addCellEditorListener(CellEditorListener listener) {
                   listenerList.add(CellEditorListener.class, listener);
              public void removeCellEditorListener(CellEditorListener listener) {
                   listenerList.remove(CellEditorListener.class, listener);
              protected void fireEditingStopped() {
                   System.out.println("fireEditingStopped called ");
                   CellEditorListener listener;
                   Object[] listeners = listenerList.getListenerList();
                   for (int i = 0; i < listeners.length; i++) {
                        if (listeners[i] instanceof CellEditorListener) {
                             System.out.println("calling editingStopped on listener....................");                    
                             listener = (CellEditorListener) listeners;
                             listener.editingStopped(changeEvent);
              protected void fireEditingCanceled() {
                   System.out.println("fireEditingCanceled called ");
                   CellEditorListener listener;
                   Object[] listeners = listenerList.getListenerList();
                   for (int i = 0; i < listeners.length; i++) {
                        if (listeners[i] instanceof CellEditorListener) {
                             listener = (CellEditorListener) listeners[i];
                             listener.editingCanceled(changeEvent);
              public void cancelCellEditing() {
                   System.out.println("cancelCellEditing called ");
                   fireEditingCanceled();
              public void addNewItemToComboBox() {
                   System.out.println("\naddNewItemToComboBox called ");
                   // tc - start
                   String text = comboBoxEditorTField.getText();
                   System.out.println("text = "+text);                    
                   int index = -1;
                   for (int i = 0; i < _cbox.getItemCount(); i++)
                        String item = ((String)_cbox.getItemAt(i));
                        System.out.println("item in cbox = "+item);
                        if (item.equals(text))
                             System.out.println("selecting item now...");                              
                             index = i;
                             _cbox.setSelectedIndex(index);
                             break;
                   if (index == -1)
                        _cbox.addItem(text);
                        int count = _cbox.getItemCount();
                        _cbox.setSelectedIndex(count -1);
              public boolean stopCellEditing() {
                   System.out.println("stopCellEditing called ");
                   fireEditingStopped();
                   _cbox.transferFocus();
                   return true;
              public boolean isCellEditable(EventObject event) {
                   return true;     
              public boolean shouldSelectCell(EventObject event) {
                   return true;
              public Object getCellEditorValue() {
                   System.out.println("- getCellEditorValue called returning val: "+_cbox.getSelectedItem());
                   return _cbox.getSelectedItem();
              public Component getTableCellEditorComponent(JTable table, Object value,
                        boolean isSelected, int row, int column) {
                   System.out.println("\ngetTableCellEditorComponent "+value);
                   String text = (String)value;               
                   for (int i = 0; i < _cbox.getItemCount(); i++)
                        String item = ((String)_cbox.getItemAt(i));
                        System.out.println("item in box "+item);
                        if (item.equals(text))
                             System.out.println("selecting item now...");     
                             _cbox.setSelectedIndex(i);
                             break;
                   return _cbox;

    I was using java 1.5.0_06 in my application and I had this problem
    When I upgraded to java 1.6.0_01, I no longer had this issue.
    This seems to be a bug in 1.5 version of Java that has been fixed in 1.6
    thanks,

  • Trying to give the focus at my JComboBox

    Hey does somebody knows what i'm doing wrong,
    i have a JFrame with a JTextField and a JComboBox, i want to give the focus on startup to the JComboBox but the form gives it to my JTextField, here is my code to ask the focus for my JComboBox
    keuzeBox.addComponentListener(new ComponentAdapter(){
    public void ComponentShown(ComponentEvent ex){
    ((JComboBox)ex.getSource()).requestFocusInWindow();
    what am i doing wrong?

    I'm not sure if componentShown is applicable to JFrame class (as a lightweight component). The event seems to not be fired.
    Try this, as you mentioned you are displaying a JFrame, prefer to use a WindowFocusListener.
            frame.addWindowFocusListener(new WindowFocusListener() {
                public void windowGainedFocus(WindowEvent e) {
                    keuzeBox.requestFocus();
                public void windowLostFocus(WindowEvent e) {
            });

  • Setting the border when JCombobox get focused

    Hello,
    Is it possible to set the border when the JCombobox get focused?
    In fact, I would like to hide the border at all, but remain the "setFocusable(true)"
    Thanks in advance.

    So why did you post your last three questions in the Swing forum, but then decide to post this "Swing related" question in the Java Programming forum?
    Is it possible to set the border when the JCombobox get focused?Try it!
    If you need further help then you need to create a [Short, Self Contained, Compilable and Executable, Example Program (SSCCE)|http://homepage1.nifty.com/algafield/sscce.html], that demonstrates the incorrect behaviour.
    Don't forget to use the Code Formatting Tags so the posted code retains its original formatting. That is done by selecting the code and then clicking on the "Code" button above the question input area.

  • FOCUS PROBLEMS IN JCOMBOBOX

    Hi,
    I have my own classes, in that one of the classes
    is extending Jcombobox.
    The problem is when i press tab , the focus
    is not highlighted in the combobox when i use
    J.D.K 1.3.1. But when i use J.D.K.1.2.2,
    focus is highlighted.
    I want the focus to be highlighted ,when i use
    J.D.K.1.3.1. also.
    Can anybody help me in this?
    Rgds,
    Sitas.

    Seems nobody got this type of problem before,
    If anybody knows please help.
    thanks in advance,
    Rgds,
    Suseela

  • JComboBox and focus

    I have 7 JComboBoxes on a JPanel on a JFrame.
    How can I dictate in the code which JComboBox has focus? Other languages I've have setFocus methods.
    Thanks,

    call requestFocus on the desired combo

Maybe you are looking for

  • Unable to open/edit Business rules v9.3

    Hello, I am unable to open/edit existing business rules in v9.3 in the AAS console. I get an error message: Exception occured: Please check your log for details. Business rules have been working without issues for months. I checked the easserver.log

  • My Monitor has lost it's identity - How can I tell?

    *How can I get my computer to recognize my Apple monitor? The monitor does not seem to be telling the computer.* Today my monitor started to jitter. I restarted the computer and watched the monitor view jitter and then collapse. It soon became a jitt

  • Balance sheet view on a specific date

    Hi Can anyone tell me, how to see balance sheet on a particular date..... Thanks Radha

  • OIM 11g R1 - Uploading photo

    Hello, is it possible to upload photo for the users inside OIM 11g R1? I didn't find an attribute for that.

  • Linuxwacom package missing

    Hello After latest Archlinux upgrade my wacom tablet (Volito 2) has stopped working normally. In Xorg logs: "No input driver matching "wacom" " I have tried to reinstall linuxwacom ( now there is linuxwacom 0.7.8-2 installed ), but: "error: 'linuxwac