Swing newbie, where are my button?

I have these 3 classes, but my button dosn't show, why not?
Here the classes come, I have cut in them, so you wont se my variable defination, but I guess you will get the picture:
--- class # 1 ---
mainFrame = new JFrame("XCom v0.1");
cardPanel = new JPanel();
cardLayout = new CardLayout();
cardPanel.setLayout(cardLayout);
Enumeration enum = this.loadedModules.keys();
while(enum.hasMoreElements()) {
  String key = (String)enum.nextElement();
  SuperModule module = (SuperModule)this.loadedModules.get(key);
  cardPanel.add(module,module.getDescriptor("name"));
cardLayout.show(cardPanel,this.properties.getProperty("modules.currentModule"));
mainFrame.getContentPane().add(cardPanel,BorderLayout.CENTER);
mainFrame.pack();
mainFrame.setVisible(true);--- class #2 ---
public class SuperModule extends JPanel {
  private Hashtable descriptors = new Hashtable();
  public SuperModule() {
    super();
  public void addDescriptor(String key, String value) {
    descriptors.put(key,value);
  public String getDescriptor(String name) {
    return (String)this.descriptors.get(name);
}--- class #3 ---
public class Mail extends SuperModule {
  GridLayout gridLayout;
  JTextArea test;
  public Mail() {
    super();
    addDescriptor("name","Mail");
  public void init() {
    gridLayout = new GridLayout(1,1,10,10);
    this.setLayout(gridLayout);
    JButton button = new JButton("I'm a Swing button!");
    this.add(button);
}

Hi,
I am not able to see where u r creating an instance of the Class Mail (bcoz its there u have buttons ).Without creating instance of the class and adding to the cardlayout I don't see how u expect the buttons to be visible.
Nagaraj

Similar Messages

  • Where are the buttons gone File upload and Download in New ABAP Editor

    Where are the buttons gone of File upload and Download in New ABAP Editor in ECC 6.0.
    Or some new utility added for this feature.
    Kindly guide.
    Thanks,
    pradeep

    Go to Utilities>more Utilities>upload/download is there.
    Amresh.

  • TS3274 How do I re-boot my IPad?   Where are the buttons to push?

    How do I re-boot my IPad?  Where are the buttons I push?

    Pess and hold the home and sleep/power  buttons at the same until the Apple logo shows.

  • The Apple TV voice tells me to press some numbered buttons. Where are the buttons?

    The Apple TV voice tells me to press numbered buttons when I select an app. Where are the buttons?

    Could be referring to airplay passcode, you enter on your device. Otherwise need more info

  • Where are the buttons of home

    Where are buttons of home & sleep???

    This shows you.  The sleep button is on top, while the home button is bottom center.

  • [Newbie] Where are good example beans to learn from?

    I have been a professional software developer for 30 years (yes, I
    started using card punches and paper tape...), and have developed 3
    commercial Java/Swing desktop apps in the past 4 years. However, all my
    experience has been desktop apps. I'm now trying to teach myself JSP
    (starting to get a handle on that) and EJB (just starting literally
    today).
    Oh yes, doing this on my own nickel at home, so I can't afford Weblogic
    yet... I have JBoss/Cataline and MySQL running on my home Mac OSX
    system.
    What are some good sites where I can find good example bean code to
    read/modify/learn from?
    I am particularly interested at this point in database access beans.
    Something I could use as a template to develop a Customer, Invoice,
    Product bean (for an app I am writing to teach myself all this stuff).
    PS: If you know someone that needs a good C/C++/Java-Swing programmer,
    send them to my resume at:
    http://www.mindstorm-inc.com/software.html
    I'm between contracts (hence the time to learn this stuff).

    Hi Burt.
    BEA WLS does have some good EJB examples you might be interested.
    After you install WebLogic Server or Platform 7.0, you will find a directories
    in <weblogic700>\samples\server\src\examples, ejb11 and ejb20 ( The naming convention
    basically means EJB examples compliant with EJB Spec 1.1 or 2.0 ).
    In particular for EJBs intensively doing Database work, you probably want to go
    through container managed and bean managed EJB examples in each of ejb11 and ejb20
    directories correspondingly. In each of the examples, there is a package-summary.html
    page provides you the example details.
    Hopefully, above helps.
    Thanks.
    Ji Zhang
    Developer Relations Engineer
    BEA WebLogic Support
    [email protected] (Burt Johnson) wrote:
    I have been a professional software developer for 30 years (yes, I
    started using card punches and paper tape...), and have developed 3
    commercial Java/Swing desktop apps in the past 4 years. However, all
    my
    experience has been desktop apps. I'm now trying to teach myself JSP
    (starting to get a handle on that) and EJB (just starting literally
    today).
    Oh yes, doing this on my own nickel at home, so I can't afford Weblogic
    yet... I have JBoss/Cataline and MySQL running on my home Mac OSX
    system.
    What are some good sites where I can find good example bean code to
    read/modify/learn from?
    I am particularly interested at this point in database access beans.
    Something I could use as a template to develop a Customer, Invoice,
    Product bean (for an app I am writing to teach myself all this stuff).
    PS: If you know someone that needs a good C/C++/Java-Swing programmer,
    send them to my resume at:
    http://www.mindstorm-inc.com/software.html
    I'm between contracts (hence the time to learn this stuff).

  • Where are the Buttons and Styles

    Greetings:
    I have installed Encore along with Premier from the downloaded file "ADBEPPROCS4_LS7.7z" I also downloaded "ADBEPPROCS4_Cont_LS7.7z" and the installer EXE. So, the installation completes but when I start Encore, the "Library" pane where, I assume, one should find all of the Styles, backgrounds, menus, buttons, etc., is completely empty. There is nothing there.
    Have I misunderstood something? My understanding was that "ADBEPPROCS4_Cont_LS7.7z" was supposed to contain additional content for Encore.
    Did I do something wrong during the installation or have a missed a step?
    Thank you,
    Mark Roberts,
    Toronto

    Mark,
    Welcome to the forum.
    Your understanding is correct. You should have that Functional Content. Please see Neil Wilke's FAQ Article on the method, just in case something was missed.
    You might also want to check your system, to see if the content is installed, but the Library Panel is just not picking it up.
    Now, this will differ for you, but my Functional Content is in C:\Adobe\Adobe Encore DVD 2.0\Library. Under this will be a series of sub-folders, with the actual Assets, mostly .PSD's, EM, WAV, WMV and some other format files. Later versions will probably have .MOV in lieu of the .WMV Motion Menu files. Also, please remember that your exact Path will differ, as your Encore will probably be in "Program Files\\\\."
    Good luck,
    Hunt

  • HT3819 how do I share movies/music between my computers. I have opened shared on both computers and both are on, but i am not able to drag anything from one to the other. Does anyone know where the settings button is on the bottom of the itunes screen?

    how do I share movies/music between my computers. I have opened shared on both computers and both are on, but i am not able to drag anything from one to the other. Does anyone know where the settings button is on the bottom of the itunes screen?

    Oops, I forgot a step between 7 and 8 ... before syncing the iPhone I need to explicitly send the document back to iTunes on the iPhone, or the changes won't come over at all ...
    and then one more thing ... Numbers on iOS does NOT recognize a number of key features of the OSX app, such as conditional formatting ... so after editing my document on iOS and syncing it back to OSX on my Mac, all of those settings are lost (no more conditional formatting, have to do it all over again)
    What am I doing wrong ?

  • In adobe reader app on iPad, I have a PDF document that added notes and comments to.  Once I left the document and returned to it, the notes and comments were gone.  Where are they?  I clicked "save" and "done" buttons after I entered text.

    In adobe reader app on iPad, I have a PDF document that added notes and comments to.  Once I left the document and returned to it, the notes and comments were gone.  Where are they?  I clicked "save" and "done" buttons after I entered text.

    The application auto-saves your input when you close the document.  If you left the document, as you state, the notes/comments should have been saved and should have been visible the next time you opened the document with the Mobile Reader (note that if you are opening the document with another app such as Apple's built in PDF Viewer, things like notes/comments may not be visible).  Also note that if you are doing an Open In... from another app (like Dropbox), the version of the document in Dropbox does not update; only the version of the document in the Mobile Reader is updated.
    Would it be possible to send a video of the problem you are encountering to [email protected] so that we can try to help?

  • Where are the agree/disagree buttons for terms and agreement?

    Where are the agree/disagree buttons for iTunes card redemption?

    They should be right there on the page, but if you don't see them, reset the phone and try again (hold down the home and power buttons until the screen goes black and the Apple logo appears, then let go).

  • Where are all the buttons?

    Dear abode users,
    I'm new to the Adobe CC series, but I have used CS5. I'm trying to make a game with flash, like I did with CS5, but where are all the buttons for Flash. An example: the buttons when your are working with AS3, like the correct all your code button that it looks nice (button).
    Is there a way to set it to the old style or something?
    Casper

    Hi,
    You are probably referring to the auto formatting buttons! They are not a part of Flash CC as of now but will be available soon in the forthcoming major update.
    -Nipun

  • Where are the tab rewind and fast forward toolbar buttons in ff 6.02?

    The navigation toolbar has historically allowed customization with a button which would rewind the tab history to the first tab opened in a session and another button which would fast forward to the most recently opened tab. Neither of the buttons are available when customizing the navigation toolbar. Are those options available in FF 6.02? If so, where are they located. If not, why not? I am aware that a left click on the back\forward buttons shows the tab history. My OS is XP and I am using FF 6.02.

    *Firefox 3 theme for Firefox 4: https://addons.mozilla.org/firefox/addon/firefox-3-theme-for-firefox/
    *Strata XP: https://addons.mozilla.org/firefox/addon/strata-xp/
    *Native XP: https://addons.mozilla.org/firefox/addon/native-xp/

  • How do I answer calls with the KITKAT update?  I hit the flashing button but it's still ringing?  Where are the Answer settings?

    How do I answer calls with the KITKAT update?  I hit the flashing button but it's still ringing?  Where are the Answer settings?

    Aha!  Thank you!!!  That was not obvious. Sometimes I don't get the green and red icons.  So it's slide it to the right for answering and slide to the left for voice mail.

  • Where are the Lock Screen and the Home buttons on my iPad2

    Where are the Lock Screen and the Home buttons on iPad2?

    See here http://www.apple.com/support/ipad/
    And here
    http://manuals.info.apple.com/en_US/ipad_user_guide.pdf

  • Where are the home and end buttons

    so i'm new to mac and purchased a mac book pro and that's when it hit me, where are the Insert, Home, End, Page Up, Page Down keys? Where are the arrow keys. I'm not much of a track pad user and although I think it is awesome I like to keep my hands on the keyboard as much as possible.
    Also, is it me or does the Delete key on a Mac move in the wrong direction (from right to left instead of left to right)?

    Welcome to Apple Support Communities.
    The answer is the Fn key...
    Held down in addition to the Left arrow is Home, with the Right arrow key is End, with the Up arrow key is PgUp, with the Down arrow key is PgDn, and with to the Delete key is Forward Delete.
    You might find it helpful to enable the Keyboard Viewer in Hardware, Keyboard, Show Keyboard viewer in menu bar. On OS X 10.6 it displays a flag for your selected country. (Not sure about OS X Lion 10.7 though.) When enabled, click on the flag and select Show Keyboard Viewer. As you press Shift, Fn, Ctrl, Alt/Option, and Command you will see onscreen what keystrokes result, separately and in combination.

Maybe you are looking for

  • How to make an account

    I have not signed up for Ichat, but it will not give me a chance to, so I thought that I could log-in with my username and password I use for Itunes or my apple account, but it would not work with either. Do you now how I can fix this? It will let me

  • Lion/snow leopard dual boot remove lion

    Hi there guys, I have recently (december 2011) purchased an early 2011 macbook pro (Inte Dual Core I5 2.3Ghz, 8Gb Ram, 500Gb hard disk, Graphics Intel Hd Graphics 3000 512Mb memory) The system came initially with Snow Leopard installed which I substi

  • BizTalk 2009 WCF-SAP Adapter Could not load file or assembly 'Microsoft.Adapters.SAP.SAPGInvoker...' one of its dependencies error

    Hello, I have a BizTalk Server 2009 running on Windows Server 2003 x64. I am installing WCF-SAP adapter and have done the following for the same. However, I am getting an error as mentioned below when I click on the Configure button of WCF-SAP adapte

  • Double image when printing labels

    I am copying in a graphic for Avery round labels. Everything looks fine on the screen, but when printed, some (not all) of the labels have the image, plus a smaller version of the image on top of it. Kind of like an inset. I have reloaded the printer

  • Can I make a special character appear when typing? (Part 2)

    Hi there I am now working on an extended version of the issue describes in this thread: http://forums.adobe.com/message/3147856#3147856 The new field should hold digits in the format 9999-99999-99999-99, and I would like the hyphens to appear automat