Developing new Swing Components - Visibility problems with UI classes

I was wondering if anyone out there had run into the following problems when developing new Swing components. If so it might be worth banding together and putting pressure on Sun to fix them. However, if no one else develops new Swing components then I guess I'm just a lone voice...
I have been writing a new dockable toolpanel Swing component and when it came to implementing the UI manager I was unable to access many of the standard features in basic and metal LAFs because they had been made package protected. This forced me to reimplement quite a bit of existing code which took time as well as being bad practice.
While in some cases I can understand this from a security POV I am pretty sure that in this case it is the result of lazy programming practice. Appart from basic architectural reasons for this I have noticed a trend where newer code seems to suffer from this more than the original code. The practice of using package protection reminds me of C++ style coding, or just that of an inexperienced developer who does not understand the need to code for extensibility.
An additional problem arises because the Security manager stops you cheating the system by putting new classes into the javax.swing.plaf... package structure. Thus the only way to solve this nicely is a proper fix.
This would entail going through all the UI PLAF classes and rationalizing the visibility to either public or protected as appropriate. Really there should be minimal use of package protection unless it is vital for security concerns.
Some Examples (there are many more):
javax.swing.plaf.basic.LazyActionMap
javax.swing.plaf.basic.BasicBorders.RolloverMarginBorder
javax.swing.plaf.basic.BasicBorders.SplitPaneDividerBorder (why are just these two classes package protected when all the others are public?)
javax.swing.plaf.metal.MetalUtils
javax.swing.plaf.metal.MetalBumps
Anyway, I am happy to give advice to other poor saps who wind up fighting the UI manager but it would be better if we could get Sun to sort out this mess (after all they created it).
Cheers, Lewis

It may be more a case of creating new Swing components and trying to provide support for all the standard LnFs.
This is very awkward although you can sometimes achieve what you want by borrowing resources from UIManager (a border here, an icon there etc.).
Essentially the problem is that Swing is designed to have new components added to it but the standard LnFs aren't quite so accommodating!

Similar Messages

  • New to Jdev: having problem with Helloworld class and the jsp

    Please, i went through the beginner's tour at oracle site and it has been interesting.
    After putting the class name as Hello, the package name as "mypackage1" as in the example, then the extend field as java.lang.object There is always an error saying that "java.lang.object is not a valid base class for this option". Please what can i do, cos it's delaying my practise.
    secondly, practising the jsp stuff is also interesting, but it's not showing the web preview. i mean after designing the stuff myself, it's giving some compilation error.
    What can I do.
    Thanks

    Hello,
    1- Are you running the "Building Your First Program with JDeveloper 10g" located at
    http://www.oracle.com/technology/obe/obe9051jdev/FirstStep/FirstStep.htm
    If not, is it working for you ?
    2- Which exact version of JDeveloper are you running ? (Help -> About)
    You should be running JDeveloper 10.1.2.x.x
    You can get Oracle JDeveloper 10g (Version 10.1.2.1, build 1913) at
    http://www.oracle.com/technology/software/products/jdev/index.html
    look for the chapter "Oracle JDeveloper 10g Production".
    3- Try re-installing JDeveloper (uncompressing the zip file) into a different
    path (ex: C:\JDeveloper10g) and retry the first steps.
    I've retested the "First Steps" against my Windows XP SP2 and it works just fine.
    Regards,
    Steff

  • [svn] 3216: Fix for MXMLG-228, a visibility problem with graphic elements.

    Revision: 3216
    Author: [email protected]
    Date: 2008-09-15 18:13:11 -0700 (Mon, 15 Sep 2008)
    Log Message:
    Fix for MXMLG-228, a visibility problem with graphic elements. This is a quick fix that may force extra display objects when toggling visibility. We should investigate alternate solutions if performance is a problem.
    Bugs: MXMLG-228
    Reviewer: Deepa
    QA: Please check for performance problems when toggling visibility of a large number of graphic elements.
    Ticket Links:
    http://bugs.adobe.com/jira/browse/MXMLG-228
    http://bugs.adobe.com/jira/browse/MXMLG-228
    Modified Paths:
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/graphicsClasses/GraphicElement .as

    Hello Antonio;
    After many, many test I discovered that the problem, at least in my case it is caused by the new ACR 4.5. Please read the Thread that I post under Camera Raw. I include the link below.
    I also open two Bug Reports about this, but as usual Adobe (and other Software Companies) will never take responsability for this, until one day they release a new version with "enhancements".
    PSE6 Organizer Crash with ACR 4.5 (Vista Only?)
    http://www.adobeforums.com/webx/.3bb6a869.59b60d3e

  • The new Firefox is having problems with imd

    the new Firefox is having problems with imd

    This is a duplicate. See -
    https://support.mozilla.com/en-US/questions/834031

  • Getting problem with DOMImplementation classes method getFeature() method

    hi
    getting problem with DOMImplementation classes method getFeature() method
    Error is cannot find symbol getFeature()
    code snippet is like...
    private void saveXml(Document document, String path) throws IOException {
    DOMImplementation implementation = document.getImplementation();
    DOMImplementationLS implementationLS = (DOMImplementationLS) (implementation.getFeature("LS", "3.0"));
    LSSerializer serializer = implementationLS.createLSSerializer();
    LSOutput output = implementationLS.createLSOutput();
    FileOutputStream stream = new FileOutputStream(path);
    output.setByteStream(stream);
    serializer.write(document, output);
    stream.close();
    problem with getFeature() method

    You are probably using an implementation of DOM which does not implement DOM level-3.

  • Problems with inner classes in JasminXT

    I hava problems with inner classes in JasminXT.
    I wrote:
    ;This is outer class
    .source Outer.j
    .class Outer
    .super SomeSuperClass
    .method public createrInnerClass()V
         .limit stack 10
         .limit locals 10
         ;create a Inner object
         new Outer$Inner
         dup
         invokenonvirtual Outer$Inner/<init>(LOuter;)V
         ;test function must print a Outer class name
         invokevirtual Outer$Inner/testFunction ()V
    .end method
    ;This is inner class
    .source Outer$Inner.j
    .class Outer$Inner
    .super java/lang/Object
    .field final this$0 LOuter;
    ;contructor
    .method pubilc <init>(LOuter;)V
         .limit stack 10
         .limit locals 10
         aload_0
         invokenonvirtual Object/<init>()V
         aload_0
         aload_1
         putfield Inner$Outer/this$0 LOuter;
         return
    .end method
    ;test
    .method public testFunction ()V
         .limit stack 10
         .limit locals 10
         ;get out object
         getstatic java/io/PrintStream/out  java/io/PrintStream;
         aload_0
         invokevirtual java/lang/Object/getClass()java/lang/Class;
         ;now in stack Outer$Inner class
         invokevirtual java/Class/getDeclaringClass()java/lang/Class;
         ;but now in stack null
         invokevirtual java/io/PrintStream/print (Ljava/lang/Object;)V
    .end methodI used dejasmin. Code was equal.
    What I have to do? Why getDeclatingClass () returns null, but in dejasmin code
    it returns Outer class?

    Outer$Inner naming convention is not used by JVM to get declaring class.
    You need to have proper InnerClasses attribute (refer to http://java.sun.com/docs/books/vmspec/2nd-edition/html/ClassFile.doc.html#79996)
    in the generated classes. Did you check using jclasslib or another class file viewer and verified that your .class files have proper InnerClasses attribute?

  • New iTunes, same sync problems with Vista

    Hi
    I got really excited when I saw in the fixes for the latest iTunes 8.1 for Windows that they had fixed sync problems with iPhones. They haven't!
    On Vista Ultimate the sync has always been a problem, with either OutlookSyncClient or AppleMobileSync (or both) frequently crashing. With the previous couple of versions of iTunes, in my case, it has happened every third or fourth sync. Now with the new version it is almost every sync. It took me five disconnect and reconnect attempts and a couple of reboots to succcessfully sync this morning.
    I've tried every fix I can find on line. I read that the Outlook sync problem was caused by an incompatibility with pst files that were not unicode. Oddly, I wasn't supposed to be able to sync with an old pst at all, but it did work erratically. Converting my pst to unicode didn't make any difference.
    With the AppleMobileSync problem, I read that completely removing all Apple software in a particular order, restarting each time between removals, then clean reinstalling, should solve the problem. It didn't.
    Now the problem is even worse and I'm at my wits end on it. Come on Apple, get a grip!
    If anyone can shed any light on this I would be really grateful!
    Tim P

    Hi
    I got really excited when I saw in the fixes for the latest iTunes 8.1 for Windows that they had fixed sync problems with iPhones. They haven't!
    On Vista Ultimate the sync has always been a problem, with either OutlookSyncClient or AppleMobileSync (or both) frequently crashing. With the previous couple of versions of iTunes, in my case, it has happened every third or fourth sync. Now with the new version it is almost every sync. It took me five disconnect and reconnect attempts and a couple of reboots to succcessfully sync this morning.
    I've tried every fix I can find on line. I read that the Outlook sync problem was caused by an incompatibility with pst files that were not unicode. Oddly, I wasn't supposed to be able to sync with an old pst at all, but it did work erratically. Converting my pst to unicode didn't make any difference.
    With the AppleMobileSync problem, I read that completely removing all Apple software in a particular order, restarting each time between removals, then clean reinstalling, should solve the problem. It didn't.
    Now the problem is even worse and I'm at my wits end on it. Come on Apple, get a grip!
    If anyone can shed any light on this I would be really grateful!
    Tim P

  • Jpopupmenu visibility problem with JWindows

    Hello,
    BACKGROUND:
    I am attempting to implement a feature similar to one found in the netbeans IDE for a programming editor I am helping to write. The feature is an autocomplete/function suggestion based on the current word being typed, and an api popup for the selected function.
    Currently a JPopupMenu is used to provide a list of suggested functions based on the current word being typed. EG, when a user types 'array_s' a JPopupMenu pops up with array_search, array_shift, array_slice, etc.
    When the user selects one of these options (using the up/down arrow keys) a JWindow (with a jscrollpane embedded in it) is made visible which displays the api page for that particular function.
    PROBLEM:
    The problem is that when a user scrolls down the JWindow the JPopupmenu disappears so he user cannot select another function.
    I have added a ComponentListener to the JPopupMenu so that when componentHidden is called I can do checks to see if it should be visible and make visible if necessary. However, componentHidden is never called.
    I have added a focuslistener to the JPopupMenu so that when it loses focus I can do the same checks/make visible if necessary. This function is never called.
    I have added a popupMenuListener but this tells me when it is going to make something invisible, not actually when it's done it, so I can't call popup.setVisible(true) from popupMenuWillBecomeInvisible because at that point the menu is still visible.
    Does anyone have any suggestions about how I can scroll through a scrollpane in a JWindow whilst still keeping the focus on a separate JPopupMenu in a separate frame?
    Cheers

    The usual way to do popup windows (such as autocomplete as you're doing) is not to create a JPopupMenu, but rather an undecorated (J)Window. Stick a JList in the popup window for the user to select their choice from. The problem with using a JPopupMenu is just what you're experiencing - they're designed to disappear when they lose focus. Using an undecorated JWindow, you can control when it appears/disappears.
    See this thread for information on how to do this:
    http://forum.java.sun.com/thread.jspa?threadID=5261850&messageID=10090206#10090206
    It refers you to another thread describing how to create the "popup's" JWindow so that it doesn't steal input focus from the underlying text component. Then, further down, it describes how you can forward keyboard actions from the underlying text component to the JWindow's contents. This is needed, for example, so the user can keep typing when the autocomplete window is displayed, or press the up/down arrow keys to select different items in the autocomplete window.
    It sounds complicated, but it really isn't. :)

  • Hello, 2 new iPad Air have problems with FaceTime...

    Sometimes  they are unable to receive FaceTime Calls...they are doing nothing, when i try to reach them with my iphone or mac...no ring, nothing...the display just keeps black. 
    On both, there is iOS 7.0.4 working.
    Sometimes there is no Problem...!
    Does anyone has the same problem with the iPad Air and 7.0.4???

    Using FaceTime http://support.apple.com/kb/ht4319
    Troubleshooting FaceTime http://support.apple.com/kb/TS3367
    The Complete Guide to FaceTime + iMessage: Setup, Use, and Troubleshooting
    http://tinyurl.com/a7odey8
    Troubleshooting FaceTime and iMessage activation
    http://support.apple.com/kb/TS4268
    iOS: FaceTime is 'Unable to verify email because it is in use'
    http://support.apple.com/kb/TS3510
    Using FaceTime and iMessage behind a firewall
    http://support.apple.com/kb/HT4245
    iOS: About Messages
    http://support.apple.com/kb/HT3529
    Set up iMessage
    http://www.apple.com/ca/ios/messages/
    iOS 6 and OS X Mountain Lion: Link your phone number and Apple ID for use with FaceTime and iMessage
    http://support.apple.com/kb/HT5538
    How to Set Up & Use iMessage on iPhone, iPad, & iPod touch with iOS
    http://osxdaily.com/2011/10/18/set-up-imessage-on-iphone-ipad-ipod-touch-with-io s-5/
    Extra FaceTime IDs
    http://tinyurl.com/k683gr4
    Troubleshooting Messages
    http://support.apple.com/kb/TS2755
    Troubleshooting iMessage Issues: Some Useful Tips You Should Try
    http://www.igeeksblog.com/troubleshooting-imessage-issues/
    Setting Up Multiple iOS Devices for iMessage and Facetime
    http://macmost.com/setting-up-multiple-ios-devices-for-messages-and-facetime.htm l
    FaceTime and iMessage not accepting Apple ID password
    http://www.ilounge.com/index.php/articles/comments/facetime-and-imessage-not-acc epting-apple-id-password/
    Fix Can’t Sign Into FaceTime or iMessage iOS 7
    http://ipadtutr.com/fix-login-facetime-imessage-ios-7/
    FaceTime, Game Center, Messages: Troubleshooting sign in issues
    http://support.apple.com/kb/TS3970
    Unable to use FaceTime and iMessage with my apple ID
    https://discussions.apple.com/thread/4649373?tstart=90
    How to Block Someone on FaceTime
    http://www.ehow.com/how_10033185_block-someone-facetime.html
    My Facetime Doesn't Ring
    https://discussions.apple.com/message/19087457
    Send an iMessage as a Text Message Instead with a Quick Tap & Hold
    http://osxdaily.com/2012/11/18/send-imessage-as-text-message/
    To send messages to non-Apple devices, check out the TextFree app https://itunes.apple.com/us/app/text-free-textfree-sms-real/id399355755?mt=8
    How to Send SMS from iPad
    http://www.iskysoft.com/apple-ipad/send-sms-from-ipad.html
    You can check the status of the FaceTime/iMessage servers at this link.
    http://www.apple.com/support/systemstatus/
     Cheers, Tom

  • Problems with importing classes in Java

    Hello,
    i have some problems with a simple project.
    The structure is like this:
    web-inf/classes/databeans/loginexistinguserform.java
    web-inf/classes/formactions/loginexistinguseraction.java
    loginexistinguserform.java :
    package databeans;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionErrors;
    import org.apache.struts.action.ActionError;
    import org.apache.struts.action.ActionMapping;
    import javax.servlet.http.HttpServletRequest;
    public class LoginExistingUserForm extends ActionForm
         String userid;
         String password;
         public String getUserid(){return userid;}
         public void setUserid(String newUserid){userid=newUserid;}
         public String getPassword(){return password;}
         public void setPassword(String newPassword) {password=newPassword;}
         public ActionErrors validate(ActionMapping mapping, HttpServletRequest request){
              ActionErrors errors=new ActionErrors();
              if(this.userid==null||this.userid.equals(""))
                   errors.add("user",new ActionError("error.userid.required"));
              if(this.password==null||this.password.equals(""))
                   errors.add("pass",new ActionError("error.password.required"));
              return errors;
    }loginexistinguseraction.java
    package formactions;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    import java.io.IOException;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import databeans.LoginExistingUserForm;
    public class LoginExistingUserAction extends Action
         public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
         throws IOException, ServletException
              LoginExistingUserForm loginData=(LoginExistingUserForm)form;
              if(loginData.getUserid().equals("Admin")&&loginData.getPassword().equals("Parola"))
                   return mapping.findForward("successLogin");
              else
                   return mapping.findForward("failureLogin");
    }I can complie succesfully loginexisitinguserform.java but problems appears when i want to compile the second file, loginexistinguseraction.java with command: javac loginexistinguseraction.java
    C:\ApacheGroup\Tomcat\webapps\PersonalWeb\WEB-INF\classes\formactions>javac loginexistinguseraction.java
    loginexistinguseraction.java:10: package databeans does not exist
    import databeans.LoginExistingUserForm;
    ^
    loginexistinguseraction.java:17: cannot find symbol
    symbol : class LoginExistingUserForm
    location: class formactions.LoginExistingUserAction
    LoginExistingUserForm loginData=(LoginExistingUserForm)form;
    ^
    loginexistinguseraction.java:17: cannot find symbol
    symbol : class LoginExistingUserForm
    location: class formactions.LoginExistingUserAction
    LoginExistingUserForm loginData=(LoginExistingUserForm)form;
    ^
    3 errors
    I have the CLASSPATH variable setup tu C:/Sun/Appserver/lib/j2ee.jar
    Can someone help me ? Thank you in advance !

    Thank you very much ! It worked. I'm really new in Jav a programming.
    Now i have encoutered another problem. When i want to login, and enter user name and password i am redirected to a login.do page, instead of Welcome.jsp
    Here is Login.jsp:
    <%@taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <%@page contentType="text/html; charset=ISO-8859-1"%>
    <html>
    <head><title>Login Form</title></head>
    <body>
    <html:errors/>
    <html:form action="/login">
    <table border="0" width="200">
    <tr>
         <td>User Name:</td>
         <td><html:text property="userid" maxlength="13"/></td>
    </tr>
    <tr>
         <td>Password:</td>
         <td><html:password property="password" maxlength="13"/></td>
    </tr>
    </table>
    <br />
    <html:submit value="Login"/>
    </html:form>
    </body>
    </html>and here is struts-config.xml :
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE struts-config PUBLIC
              "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
              "http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd">
    <struts-config>
    <!--========================beans for HTML form data=======================-->
    <form-beans>
         <form-bean name="loginBean" type="databeans.LoginExistingUserForm"/>
    </form-beans>
    <!--========================Action Mappings================================-->
    <action-mappings>
         <action path="/login" type="formactions.LoginExistingUserAction" name="loginBean" input="/Login.jsp" scope="session">
              <forward name="succesLogin" path="/pages/Welcome.jsp" redirect="true"/>
              <forward name="failureLogin" path="/pages/Diverse.jsp" redirect="true"/>
         </action>
    </action-mappings>
        <message-resources parameter="MessageResources" />
    </struts-config>

  • Problem with JFrame class.

    To risolve my problem i need for few diferent frame
    ( for esample in one i put JTextFild that take the user input, in a nother one i need for program output ) . But, th problem is, all my frames using the same object.
    If i construct diferent JFrame window class i have problem that i don't acess in the same object from all the window. And if i dont use a object, i have static acess .
    I risolve the problem with 1 JFrame class with diferent constructors, but i wont a diferent way to risolve my problem, because there are few windows.
    Help me.....

    Make the class that extends JFrame an inner class of the the main class. You can then access all members of the outer class.

  • Problem with loading classes!!!

    I am loading classes using
    // Open File
    InputStream jarFile = new BufferedInputStream(new FileInputStream(
    pluginPath));
    // Get Manifest and properties
    Attributes attrs = new JarInputStream(jarFile).getManifest().
    getMainAttributes();
    jarFile.close();
    // Read Main Class
    String mainClass = attrs.getValue("Protocol-Class");
    // Load all classes from jar file without giving classpath
    URL url = new URL("jar:file:" + pluginPath + "!/");
    JarURLConnection jarConnection = (JarURLConnection) url.openConnection();
    URL[] urls = new URL[] {
    url};
    ClassLoader classLoader = new URLClassLoader(urls);
    // Create new instance of protocol
    Protocol protocol = (Protocol) classLoader.loadClass(mainClass).
    newInstance();
    I am loading classes one by one say a order A, B, C. In my case class c extends class A. So I am loading class A first and later B and finally C. But I am getting exceptions when loading class C that Class A is unknown.The following exception is thrown
    java.lang.NoClassDefFoundError: com/a/A at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
    Please give me a solution to make it run.

    You create a new class loader for each class. The class loaders are independent, and so the class hierarchies they load are independent. Class A loader by classLoaderOne doesn't see class B loader by classLoaderTwo - they are loaded into their own sandboxes.
    Either load everything with one class loader or create the class loaders in a hierarchy. To create a hierarchy use the class loader constructor that takes a parent class loader as a parameter. One class loader may be easier because then you don't need to worry about loading order.

  • Problems with loading Classes from a Directory of a jar file.

    Hi Guys,
    i have a problem with my programm. It works greatly in my eclipse platform. but there are all classes in my default folder. I want to add a plugin function now. My Abstract classes are in in my default folder and my doughter classes are in my plugin-folder called plugin.
    I look what is in the pluginfolder -> all my doughter classes. but i every time get a Class Cast Exception and an ClassNotFoundException.
    How can i do that ? Current i do it with Class.forName(frames.substring(0,frames[i].indexOf(".class")));
    best regards flo

    http://java.sun.com/j2se/1.3/docs/tooldocs/win32/classpath.html

  • Inheritance problem with parent class calling child class

    I have a problem with inheritance with a parent class calling a child class method. Below is the example pseudocode code and my problem:
    public abstract class A {
        protected void function1 ( ) { }
        protected void function2 () {
             //calls function1();
             function1();
    public abstract class B extends A {
        protected void function1 ()  {
             // do stuff
    public class C extends B {
        protected void function1 ()  {
            // do stuff
            super.function1 ();
    }I have an object instance of class C created and its function2() is invoked.
    My problem is, while in function2(), which belongs to abstract class A and the method call to function 1() is called, the call invokes the function1() of class B. Shouldn't the call invoke function 1() of class C instead? And then function1() of class B will be called after due to the super.function1(). It's not behaving like I thought it would.
    Edited by: crono77 on Jan 10, 2008 8:13 PM

    Nevermind, i found my error :)

  • Swing layout/size problem with JFrame and JApplet.

    I have a class that extends a JFrame, the classes layout is BorderLayout. I then have a class that extend JApplet, this classes layout is GridBagLayout (this class has a JTabbedPane - which contains JPanels). The problem I'm having is no matter how big I make the size of the applet or frame (using setSize), the applet/frame stays the same size - no matter how large I make it.
    Can anyone please help?
    Thanks,
    dosteov

    Here is the basic code:
    Thanks in advance,
    dosteov
    public class EADAdm extends JApplet
    EADAdmFrame theFrame = new EADAdmFrame(this);
         public void init()
              // Take out this line if you don't use symantec.itools.net.RelativeURL or symantec.itools.awt.util.StatusScroller
    //          symantec.itools.lang.Context.setApplet(this);
              // This line prevents the "Swing: checked access to system event queue" message seen in some browsers.
              getRootPane().putClientProperty("defeatSystemEventQueueCheck", Boolean.TRUE);
              // This code is automatically generated by Visual Cafe when you add
              // components to the visual environment. It instantiates and initializes
              // the components. To modify the code, only use code syntax that matches
              // what Visual Cafe can generate, or Visual Cafe may be unable to back
              // parse your Java file into its visual environment.
              //{{INIT_CONTROLS
              getContentPane().setLayout(new GridBagLayout());
              setEnabled(false);
              getContentPane().setBackground(java.awt.Color.lightGray);
              setSize(800,800);
              getContentPane().add(AdmTab, new com.symantec.itools.awt.GridBagConstraintsD(0,1,2,1,0.5,0.5,java.awt.GridBagConstraints.CENTER,java.awt.GridBagConstraints.HORIZONTAL,new Insets(3,12,4,14),120,120));
              AdmTab.setFont(new Font("Dialog", Font.PLAIN, 12));
              titleLbl.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
              titleLbl.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
              titleLbl.setText("EAD Administration");
              getContentPane().add(titleLbl, new com.symantec.itools.awt.GridBagConstraintsD(0,0,1,1,0.0,0.0,java.awt.GridBagConstraints.CENTER,java.awt.GridBagConstraints.NONE,new Insets(12,36,0,0),307,15));
              titleLbl.setForeground(java.awt.Color.blue);
              titleLbl.setFont(new Font("Dialog", Font.BOLD, 15));
              exitBtn.setText("Exit EAD Administration");
              exitBtn.setActionCommand("Exit EAD Administration");
              getContentPane().add(exitBtn, new com.symantec.itools.awt.GridBagConstraintsD(0,2,2,1,0.0,0.0,java.awt.GridBagConstraints.CENTER,java.awt.GridBagConstraints.NONE,new Insets(6,371,10,14),66,8));
              exitBtn.setFont(new Font("Dialog", Font.PLAIN, 12));
         //theFrame.setVisible(false);
         login();
         AdmTab.addTab("Administration", new LogoPanel() );
         userPanel = createUserPanel();
         AdmTab.addTab("Edit Users", userPanel );
         fpoPanel = createFPOPanel();
         AdmTab.addTab("Edit FPO", fpoPanel );
         regulationPanel = createRegulationPanel();
         AdmTab.addTab("Edit Regulations", regulationPanel );
         rolloverPanel = createRolloverPanel();
         AdmTab.addTab("Rollover", rolloverPanel );           
              //{{REGISTER_LISTENERS
         SymMouse aSymMouse = new SymMouse();
              this.addMouseListener(aSymMouse);
              SymAction lSymAction = new SymAction();
              exitBtn.addActionListener(lSymAction);
              SymKey aSymKey = new SymKey();
              this.addKeyListener(aSymKey);
         theFrame.getContentPane().add(this);
    public class EADAdmFrame extends JFrame
    EADAdm theApplet;
    public EADAdmFrame(EADAdm theMainApplet)
              //{{INIT_CONTROLS
         //     theApplet = theMainApplet;
         //     this.getContentPane().add(theApplet);
              getContentPane().setLayout(new BorderLayout(0,0));
              getContentPane().setBackground(java.awt.Color.lightGray);
              setSize(1000,1000);
              setVisible(false);
         theApplet = theMainApplet;
              //{{REGISTER_LISTENERS
              SymWindow aSymWindow = new SymWindow();
              this.addWindowListener(aSymWindow);
              SymComponent aSymComponent = new SymComponent();
              this.addComponentListener(aSymComponent);

Maybe you are looking for