0 Replies Latest reply: Apr 4, 2013 6:35 PM by 998211 RSS

    right click context menu does not appear only for Java 1.7, AWT TextField

    998211
      I have been debugging some issues that an application has been having with Java 1.7 versus older versions. A new problem I have encountered is that the right click context menu does not function in any TextField. It works fine when running/compiling it with any previous version of Java. I have tried coding a simple test with a Frame, Panel and TextField to see if it might be something else in the more complex application that was causing it, but the simple test class has the same problem.

      I have searched for other people having the same issue, but I have not found anything comparable. This seems like a huge change from one version to the next and I am surprised that I am not finding this mentioned anywhere else. Can someone point me to anything that discusses this issue that I am having? Does 1.7 require I implement my own context menu? I realize AWT is old technology, but this is an old, fairly complex application that doesn't use swing, and that is not going to change at this point.

      My simple test:
      import java.awt.*;  
      import java.awt.event.*;  
      import java.util.*;  
        
      class testF3 extends Panel  
      {  
        public static void main(String args[])  
        {  
          Frame f = new Frame();  
          Panel p = new Panel();  
          f.setLayout(new BorderLayout());  
          f.add("North", p);  
          TextField tf1 = new TextField("", 20);  
          p.add(tf1);  
          Dimension medm = f.getSize();  
          medm.height = 100;  
          medm.width = 200;  
          f.setSize(medm);  
          f.setVisible(true);  
        }  
      }