Why label is not showing?

Hi,
I have a class that extends JWindow....but when I add label, i cant see the text..
public class myWindow extends JWindow {
     public myWindow() {
              setLocation(100,100);
              setSize(200,200);
              JLabel label = new JLabel("My label");
               getConentPane().add(label);
public class testWindow  {
      public void static main (String[] args) {
             myWindow m = new myWindow();
             m.show();
}thats basically how I am doing it....but when the window appears, it just shows a gray window...no text.
thanks.

Here;-import javax.swing.*;
import java.awt.event.*;
// Note that class file names start with a capital letter by code convention /syntax style
class MyWindow extends JWindow {
   public MyWindow() {
      setLocation(100,100);
      setSize(200,200);
      JLabel label = new JLabel("My label");
      getContentPane().add(label, java.awt.BorderLayout.NORTH);
      addMouseListener(new MouseAdapter(){
         public void mousePressed(MouseEvent me){
            System.exit(0);
public class TestWindow{
   public static void main (String[] args) {
      new MyWindow().show();

Similar Messages

  • In Icloud I can't see my "numbers" icon which i need to select "tick" to transfer data to my other devices via icloud. any ideas why it's not showing up?

    In Icloud on my imac I can't see my "numbers" icon which i need to select "tick" to transfer data to my other devices via icloud. any ideas why it's not showing up?

    You have to do it app wise, which means that the icon won't show up in settings, but you will be able to move files from your local drive to iCloud via the Numbers app (move... > choose the iCloud option).
    It requires that you set up the same iCloud account on all your devices and that you have the latest version of Numbers on all your devices as well.

  • Put movies in itunes on one computer why does it not show up when i access itunes from other computers or ipad2?

    put movies in itunes on one computer why does it not show up when i access itunes from other computers or ipad2?

    i just purchased a file that had videos in it. i put them in the itunes library on my pc where i first downloaded them. i was able to transfer them to my other pc, a laptop, through my home network. i am now trying to get them on my mac pro desktop and my ipad2. my mac pro can see the other computers on my home network but i cannot get it to connect to them. i know the operating systems are different but was hoping i could transfer pictures and files from pc to mac this way. haven't been able to get it to work yet. the videos i am trying to get my mac to see came in a folder with both mac and pc versions. i thought if i got the videos i purchased into itunes that i would then be able to get them to my mac pro and my ipad2. i am new to mac/apple and have always been pc-centric so trying to marry it all has been difficult. i speak pc pretty well but am just learning apple. am i trying to do things that are not possible? i sure could use a knowledgable friendly soul to walk me through my issues of having pc and mac on the same network. i have been able to get all computers and ipad to print on my network. thanks.

  • Why is it not showing in my list of artists?

    I'm new to this stuff so I may sound stupid here. I'm looking for an artist in my list of artist on the IPod itself, and it's not showing. However, if I look under the songs list, the songs that I'm looking for are there. So, why is it not showing the artist in the artist list, but it shows the songs with the correct artist name in the songs list. It also shows the albums by this artist. Any ideas?

    Is it a song on a compilation CD you burned? That might be the case.
    If it's an artist album, you probably need to make sure that Artist and Album Artist have the same information.
    Song: Mercy
    Album Artist: Duffy
    Artist: Duffy
    Would be an example.
    Let me know!

  • Is it free to send messages in iMessage to another county? if yes why it does not show that these messages from iMessage?

    Is it free to send messages in iMessage to another county? if yes why it does not show that these messages from iMessage?

    if you receive an imessage not on any internet connection you will receive it as a sms (green) and yes it counts toward your texting plan

  • Why are contacts not showing up after added

    why are contacts not showing up after added. Don't show up after they added when I want to select then for a new email

    I am replying to my post with the hopes that someone can please help me!
    I am adding new episodes, but they don't show up on the main page. The most recent one to show up is from 10/29/07. I added a new episode today, but it doesn't appear on the main page (before you subscribe). Is there a limit to the # of podcasts that can appear on the main page? Has anyone else had this problem? All the relevant info is above.
    Your help is much appreciated.
    Message was edited by: oneness_podcaster

  • HT204291 When using my iPad and playing videos, I only hear the sound. Why will it not show the video?

    When using my iPad and playing videos, I only hear the sound. Why will it not show the video?  My iPad 2 and iPhone 5 work no issues.

    Hi sheilafrommannford,
    Welcome to the Support Communities!
    The articles below may be able to help you with this issue.
    Click on the links to see more details and screenshots.
    Using AirPlay
    http://support.apple.com/kb/HT4437
    Troubleshooting AirPlay and AirPlay Mirroring
    http://support.apple.com/kb/TS4215
    Cheers,
    Judy

  • Added or ediited texts by Bluebeam Revu,and has been saved,when I open it by the Adobe reader version 8.1,why it does not show my texts added by Revu?8.1 is my favorite version,I also tried it in a later version fo Reader,it doesn't work too!

    Added or ediited texts by Bluebeam Revu,and has been saved,when I open it by the Adobe reader version 8.1,why it does not show my texts added by Revu?8.1 is my favorite version,I also tried it in a later version fo Reader,it doesn't work too!

    Bernd Alheit wrote:
    Looks like a problem of Bluebeam Revu, not Adobe Reader.
    The response above is only a speculative answer to the original question. DSI-Hal, did you try to flatten the text in Bluebeam Revu prior to opening it in Adobe. This has worked for me on several different documents but not sure if we are using the same version of Adobe Reader.
    Give it a shot. Good luck.

  • When i go into finder   click on pictures why dose it not show all photos just lets me open iphoto

    when i go into finder   click on pictures why dose it not show all photos just lets me open iphoto 

    Ralph9430 offers a good suggestion.  But you may need to do this before taking his advice:
    Check in iPhoto's Preferences (which you can open from the iPhoto menu).  Look in General, and make sure "Connecting Camera Opens" is set to "Image Capture").
    If it is set to "iPhoto", you won't be able to get to Image Capture easily.

  • HT4059 When purchased on iPhone why are they not showing up on my iPad

    When purchased on iPhone why are they not showing up on my iPad

    Have you got automatic downloads turned on in Settings > Store on the iPad ?

  • Contact form labels do not show in Chrome until refreshed

    On my contact page, http://truehdfitness.com/contact.html, the labels do not show up unless the user refreshes the page.  It's happened to everyone who has tested the page for me and used Chrome as well as on my own computer.  For now, I've added a note about the issue, but that's obviously not the optimum solution.  Any suggestions?
    Thanks!
    Dedi

    What you are probably experiencing is a known bug with Chrome 33. Refer to this thread - http://forums.adobe.com/message/6157419.
    We also have a workaround for that - http://muse.adobe.com/exchange-library/chrome-33-webfont-workaround-1.
    Thanks,
    Vinayak

  • Gmail archived/labeled Emails not showing problem FIX SOLUTION FOUND - BUT STILL NOT FIXED!

    Newest edits in here:
    http://forums.crackberry.com/general-blackberry-discussion-f2/please-send-very-important-10os-device...
    100% FIX SOLUTION GUARANTEE for Gmail archived/labeled Emails not showing problem!
    How to fix it? FIX "Show Read Filed Emails" button to respond to ON and OFF devices Blackberry HUB for Gmail accounts - NOW IT IS ALWAYS OFF if you press ON or OFF!
     "Show Read Filed Emails" button ON and OFF for Gmail account works on Blackberry Blend desktop version!
    Works with: Blackberry Blend desktop version responds to "Show Read Filed Emails" button ON AND OFF with Gmail accounts! (pressing "Show Read Filed Emails" button ON and OFF again and again, view in Blackberry Blend immediately changes in order you press ON or OFF, but Blackberry HUB is always on OFF)
    Error/Bug: Blackberry HUB do not show Gmail labeled emails
    Main problem: Blackberry HUB "Show Read Filed Emails" button doesn't respond to ON AND OFF and is always OFF fo Gmail account.
    Main problem: ALL Blackberry 10OS devices Blackberry HUB"Show Read Filed Emails" button ON AND OFF doesnt respond with Gmail accounts!
    "Show Read Filed Emails" button doesn't work with: Gmail accounts
    Status: NOT FIXED!
    OS version: Blackberry 10 OS version OFFICIAL 10.3.1.1565
    PROBLEM FOUND!
    I created new Gmail account send 5 test emails and made first 2 test emails labeled and made step by step set up on my Blackberry 10OS device to confirm this ''Show Read Filed Emails'' button BUG/PROBLEM/ERROR:
    1. I signed in with my Blackberry 10OS device like this:
    http://forums.crackberry.com/attachments/blackberry-10-os-f269/338846d1425503380t-gmail-archived-lab...
    2. When I set on Gmail account settings "Sync Timeframe" is set to FOREVER and "Sync All Emails Folders" is set to ON
    http://forums.crackberry.com/attachments/blackberry-10-os-f269/338847d1425503392t-gmail-archived-lab...
    3. And at last I go to devices Blackberry HUB and see this:
    http://forums.crackberry.com/attachments/blackberry-10-os-f269/338856d1425505143t-gmail-archived-lab...
    As you can see it doesn't matter if "Show Read Filed Emails" button is set to ON or OFF, Blackberry HUB doesnt respond at all, but Blackberry Blend view changes at same second then I press.
    CONCLUSION: "Show Read Filed Emails" button ON and OFF BUG/PROBLEM/ERROR for Gmail accounts is confirmed and it STILL NOT FIXED!
    Please spread the word to people who have all the power to influence and accelerate processes to FIX this VERY SERIOUS ISSUE or please tell me there could I send this FIX SOLUTION to to get fastest respond and get it FIXED ASAP. THANK YOU!
    STILL NO FIX!

    If you select one month for mail days to sync, only one month's worth will be synced and available - the last month which will be constantly changing to the most recent 30 days. Select No Limit for Mail Days to Sync.
    Show 1000 recent messages is for the selected mailbox only and if there are more than 1000 messages in a mailbox and you have one month for mail days to sync selected, if the last 30 days for the mailbox includes 100 messages, only 100 messages will be available.
    Are these additional server stored mailboxes separate mailboxes and what I mean by that is not sub-mailboxes for the Inbox mailbox?
    Since you have had this issue with other operating systems, the common denominator is your Hotmail account. Have you contacted Hotmail technical support regarding this issue you have had with other operating systems?
    All server stored mailboxes with an Exchange account should be available with the email client used to access the account. If all are not available when accessing the account as an Exchange account with an email client, something is wrong with your setup for these mailboxes at the server level.

  • Why Label is not resizing??

    Hi,
    Can anybody explain me why the label is not being displayed properly??
    Thanks in advance.
    --Bhupendra Mahajan
    import java.awt.event.*;
    import java.awt.*;
    class App extends Frame implements ActionListener{
         Button b1;
         Label l1;
         Panel p1,p2;
         int i;
         App(){
              b1 = new Button("Click");
              l1 = new Label();
              b1.addActionListener(this);
              setLayout(new GridLayout(2,1));
              p1= new Panel();
              p2= new Panel();
              p1.add(l1);
              p2.add(b1);
              add(p1);
              add(p2);
              this.addWindowListener(new WindowAdapter(){
                   public void windowClosing(WindowEvent we){
                        System.exit(0);
         public void actionPerformed(ActionEvent ae){
              l1.setText("Clicked " + ++i + " times");
         public static void main(String args[]){
              App app = new App();
              app.setSize(400,100);
              app.show();

    The layout manager does not know the change, so tell
    him exciplitly to re-layout the panel.
    public void actionPerformed(ActionEvent ae){
    l1.setText("Clicked " + ++i + " times");
    // re-layout container
    p1.doLayout();
    Thanks for the reply.
    I just got curios.
    If i had another class which implements ActionListener (i.e. not an inner class , or the same class implementing the listener)
    Is the following code is a right way to do??
    import java.awt.event.*;
    import java.awt.*;
    class App extends Frame {
         Button b1;
         Panel p1;
         App(){
              b1 = new Button("Click");
              b1.addActionListener(new MyListener());
              setLayout(new GridLayout(2,1));
              p1= new Panel();
              p1.add(b1);
              add(p1);
              this.addWindowListener(new WindowAdapter(){
                   public void windowClosing(WindowEvent we){
                        System.exit(0);
         public static void main(String args[]){
              App app = new App();
              app.setSize(400,100);
              app.show();
    class MyListener implements ActionListener{
         int i;
         public void actionPerformed(ActionEvent ae){
              Button b = (Button)ae.getSource();
              b.setLabel("Clicked " + ++i + " times");
              b.getParent().doLayout();
    }--Bhupendra Mahajan

  • The firefox icon shows on my desk top and in my task bar, but why does it NOT show in my list of Program files?

    My Firefox icons are showing and usable from the desktop and from the task bar; however, the Mozilla Firefox does not show in my list of program files. Why doesn't it show?

    Hello,
    Certain Firefox problems can be solved by performing a ''Clean reinstall''. This means you remove Firefox program files and then reinstall Firefox. Please follow these steps:
    '''Note:''' You might want to print these steps or view them in another browser.
    #Download the latest Desktop version of Firefox from http://www.mozilla.org and save the setup file to your computer.
    #After the download finishes, close all Firefox windows (click Exit from the Firefox or File menu).
    #Delete the Firefox installation folder, which is located in one of these locations, by default:
    #*'''Windows:'''
    #**C:\Program Files\Mozilla Firefox
    #**C:\Program Files (x86)\Mozilla Firefox
    #*'''Mac:''' Delete Firefox from the Applications folder.
    #*'''Linux:''' If you installed Firefox with the distro-based package manager, you should use the same way to uninstall it - see [[Installing Firefox on Linux]]. If you downloaded and installed the binary package from the [http://www.mozilla.org/firefox#desktop Firefox download page], simply remove the folder ''firefox'' in your home directory.
    #Now, go ahead and reinstall Firefox:
    ##Double-click the downloaded installation file and go through the steps of the installation wizard.
    ##Once the wizard is finished, choose to directly open Firefox after clicking the Finish button.
    More information about reinstalling Firefox can be found [https://support.mozilla.org/en-US/kb/troubleshoot-and-diagnose-firefox-problems?esab=a&s=troubleshooting&r=3&as=s#w_5-reinstall-firefox here].
    <b>WARNING:</b> Do not run Firefox's uninstaller or use a third party remover as part of this process, because that could permanently delete your Firefox data, including but not limited to, extensions, cache, cookies, bookmarks, personal settings and saved passwords. <u>These cannot be recovered unless they have been backed up to an external device!</u>
    Please report back to see if this helped you!
    Thank you.

  • I own iLife '11, why does it not show as installed?

    I have iLife '11 loaded on my computer as well as iWork '09.  Why don't they show up as installed from the app store?

    Because they were purchased as a the suite of software, not as individual components that are availablw from the App Store.
    The updates for your iLife and iWork software are available from your Apple menu / Software Update.
    If you had purchased the components, the updates would be available from the App Store.

Maybe you are looking for

  • My iTunes keeps clearing all of the music of my iPod Touch 4th Generation randomly when I plug it in, then starts syncing it back up. Why?

    So my iPod Touch has been cleared twice now and I'm beginning to become annoyed. I plug it in and iTunes recognizes it, and then goes through the steps of syncing. Once it gets to steps 5 or 6 it gets stuck. It'll just keep spinning or cycling throug

  • Browser Plug-in / Paid Job

    I need a plug-in that calls up a web browser within PS, nothing more.  I will pay someone for the Job, I assume good knowledge of the SDK will be required. 

  • Rendering Project - Audio failure

    Hi, I've just finished a music video, where the sound was recorded separately. I synchronized the sound with the picture by slowing it down 1%. Everything works fine in the work area, but after rendering or exporting the project the sound goes back,

  • 2 Depreciation Areas For Different Ledgers

    Dear All, I'm using 2 depreciation areas (01, 60) for different ledger (L1, L2) due to company requirements. However, during asset retirement, posted amount does not reflected correctly in Ledger 2 (depreciation 60). Amount displayed correctly in Ass

  • My Nokia E71 automatically deleted/removed some in...

    Good afternoon all. I had recently purchased a Nokia E71 and installed quite a bit of applications: From themes to instant chat Java based midlets signed and unsigned to various java based games (jar/jad). The problem is that my phone has some-how au