Already defined scrollPane for JList..but duzen appear...plzz elp..real thx

I already defined JScrollPane for my JList...but it juz duzen wanna appear...i cant see anything wrong wid the code...plzz elp me solve this....i'd be really grateful...thanks alot ppl...da code is below:
import java.awt.*;
import javax.swing.*;
class DrawGUI extends JFrame {
     String [] names = {"Jasima Bte Syed Syed Sulaiman",
                              "Yang Shulei",
                              "Nur Farina",
                              "Lee Chee Chong",
                              "Wang Ding Yu",
                              "Sanjeev Singh",
                              "Testing please",
                              "wrk"};
     JList contactList = new JList(names);
     JScrollPane scrollPane = new JScrollPane(contactList);
     JButton btnAddContact = new JButton("Add Contact");
     JButton btnDeleteContact = new JButton("Delete Contact");
     JButton btnEditContact = new JButton("Edit Contact");
     JButton btnSearchContact = new JButton("Search");
     JLabel lblCurrentList = new JLabel("Current List of Contacts",JLabel.CENTER);
     JLabel lblSearch = new JLabel("Type in the Name of the Contact",JLabel.LEFT);
     JLabel lblProfile = new JLabel("Profile of Contact",JLabel.LEFT);
     JLabel lblPhoto = new JLabel(new ImageIcon("jasima.jpg"));
     JLabel lblName = new JLabel("Name: Jasima Bte Syed Sulaiman",JLabel.LEFT);
     JLabel lblNickname = new JLabel("Nickname: DJk|ddGA|",JLabel.LEFT);
     JLabel lblEmail = new JLabel("E-Mail Address: [email protected]",JLabel.LEFT);
     JLabel lblAddress = new JLabel("Address: Blk 123 Kuching Street #11-222",JLabel.LEFT);
     JLabel lblPostalCode = new JLabel("Postal Code: Singapore 650346");
     JLabel lblContactNoHome = new JLabel("Contact No(Home): 652123",JLabel.LEFT);
     JLabel lblContactNoMobile = new JLabel("Contact No(Mobile): 90029856",JLabel.LEFT);
     JTextField txtSearch = new JTextField();
     AddContactButtonListener addContactButtonListener = new AddContactButtonListener();
     EditContactButtonListener editContactButtonListener = new EditContactButtonListener();
     SearchContactButtonListener findContactButtonListener = new SearchContactButtonListener();
     public DrawGUI() {
          Container c = getContentPane();
          c.setLayout(null);
          c.add(contactList);
          c.add(scrollPane);
          c.add(btnAddContact);
          c.add(btnDeleteContact);
          c.add(btnEditContact);
          c.add(btnSearchContact);
          c.add(lblCurrentList);
          c.add(lblSearch);
          c.add(lblProfile);
          c.add(lblPhoto);
          c.add(lblName);
          c.add(lblNickname);
          c.add(lblEmail);
          c.add(lblAddress);
          c.add(lblPostalCode);
          c.add(lblContactNoHome);
          c.add(lblContactNoMobile);
          c.add(txtSearch);
          btnAddContact.addActionListener(addContactButtonListener);
          btnEditContact.addActionListener(editContactButtonListener);
          btnSearchContact.addActionListener(findContactButtonListener);
          contactList.setBounds(200,100,270,110);
          btnAddContact.setBounds(10,100,150,40);
          btnDeleteContact.setBounds(10,150,150,40);
          btnEditContact.setBounds(10,200,150,40);
          btnSearchContact.setBounds(380,335,90,30);
          lblCurrentList.setBounds(200,55,140,40);
          lblSearch.setBounds(200,250,200,40);
          lblProfile.setBounds(510,55,200,40);
          lblPhoto.setBounds(510,100,100,98);
          lblName.setBounds(510,250,300,20);
          lblNickname.setBounds(510,270,300,20);
          lblEmail.setBounds(510,290,300,20);
          lblAddress.setBounds(510,310,300,20);
          lblPostalCode.setBounds(510,330,300,20);
          lblContactNoHome.setBounds(510,350,300,20);
          lblContactNoMobile.setBounds(510,370,300,20);
          txtSearch.setBounds(200,295,270,30);
          setSize(800,500);
          setTitle("Contact Book");
          setVisible(true);
          setResizable(false);
          

you should only be adding the scrollPane to the container not the list itself.

Similar Messages

  • Had to restore my Mac Book with Snow Leopard. My i Life disc appears to be damaged, and I can't restore my iPhoto application. I have searched for downloads but all appear to be upgrades. Any ideas on how to restore iphotos

    Had to restore my Mac Book with Snow Leopard. My i Life disc appears to be damaged, and I can't restore my iPhoto application. I have searched for downloads but all appear to be upgrades. Any ideas on how to restore iphotos

    Given what you describe you will have to upgrade Snow Leopard by downloading and installing Mac OS X 10.6.8 Update Combo v1.1. Then go to the App Store and sign in with your Apple ID. Purchase and download Mountain Lion to upgrade your OS. Then purchase the latest upgrades for the iLife applications which includes iPhoto.
    Or you can go on eBay, Google, or Amazon and purchase another copy of the DVD based iLife.

  • Ibooks ready for sale but not appearing in itunes

    I have published a number of books through iBooks Author but only two appear in itunes while they all are marked 'ready for sale' in itunes connect. Is there a setting that needs to be changed to correct this?

    Clarify,  when you  open iTunes Connect > Manage your Books. Do ALL you books accepted and passed by the review team show there?
    "Ready for Sale"   Have you set the  Price and  Territories ?
    "A number of books"  if you have  successfully delivered a book, its still possible that the review team will issue a ticket - which needs corrections and this shows in your iTunes Connect with a ticket.
    Unless things have changed since I  last uploaded... if your books do not show in the "Manage your Books" section of iTunes Connect,  they were never uploaded. Did you  haveany problems duirng teh  delivery process?
    OR    I have published a number of books through iBooks Author but only two appear in itunes
    Are you say  that all your books show in iTunes Connect - but only two show as "ready for Sale"
    WIth regard showing in iTunes, unless you rank alongside  Steven King et al, or your books a selling really well... finding them in iTunes is not always easy?  You will need to do a search either for teh titel or author name and the categories your  opted for.  OR,  if you  were one of the few to understand  the "Keywords" significance in the Inspector> document tab,  use any  or all of your keywords.

  • Defining field for T021S but not displaying in automated structure

    Hi,
    I am facing following problem:--
    I have define two fields throgh IMG>Finacial accounting>a/c rec. and payable>line item>display line item-->define additonal field
    After defining its showing 2 field entries into <b>T021S</b> table and also added two fields into automated generated Structure <b>FAGLPOSYEXT</b> .After moving transport request for these 2 fields for FAGLPOSYEXTinto Quality client ,its not showing thease 2 fields into quality for <b>FAGLPOSYEXT</b>.Infact both field entries showing correctly in Development client as well as quality client for table <b>T021S</b>.
    can you please anybody help me out in this.
    Many thanks in advance,
    Binod K singh.

    Hi,
    Follow the steps.
    1. Delete Setup tables in LBWG.
    2. Clear Q in SMQ1/LBWQ.
    3. Delete Q in RSA7.
    Then fine the ECC correct client for Customizing and there you can do the changes and activate it. If still it is not allowing and you want to add fields by using enhancements then goto SE11, and give MCCOMP and Append Structure and add fiels and write code in CMOD.
    Thanks
    Reddy

  • Tomcat Error : OutPutstream is already being used for this request

    I'using Jdev3.2 to develop an application based on the dataweb
    beans.
    I'm using the EditCurrentRecord, and the function UseListOfValue
    to disply lovs.
    I deployed the application on tomcat, when the page is displayed
    an execption occur which is 'OutPutstream is already being used
    for this request'
    can someone help me please
    THX in advance
    Ghassen

    can someone help?
    Please

  • I installed Mountain Lion so that I could sync my notes with my iPhone that already syncs notes with a specific email address I use for school, but during the install it automatically set up Notes to sync w the wrong email addy. How can I fix it?

    I installed Mountain Lion so that I could sync my notes with my iPhone that already syncs notes with a specific email address I use for school, but during the install it automatically set up Notes to sync w the wrong email addy. It looked in Mail, which had 5 email accounts set up in it, and for some reason picked the only one that I no longer use because it is for a school that I no longer attend. How can I fix it so that it syncs with the correct email account for notes and calendar? There don't seem to be any settings available other than to check if you want to use the basic features. It also said during the set up that it was setting up 'find my mac' but if I look on the iCloud website there is nothing showing there for finding my mac.
    At this point I feel like I wasted my money paying for this supposed upgrade. I got nothing for it but frustration. It even automatically set my security settings to allow only downloads from the Mac store so the first time I went to download something I had to stop what I was doing and go correct settings first. I feel like there should be a security setting to block downloads from the Mac store so I don't accidentally end up clicking the wrong thing and being charged.

    iCloud isn't syncing them on your phone.  You simply added the email account to your phone and enabled calendar and notes syncing with the email provider, and the calendar and notes appear in the calendar and notes apps on your phone.  You can do this with Gmail, Yahoo and other IMAP account.  iCloud email is just another IMAP account, but syncs notes with Apple's iCloud server just as Gmail syncs notes and calendars with Google's server.
    iCloud didnt' set up a non-iCloud account on your Mac.  When you check Mail in System Preferences>iCloud, it only creates an iCloud email account.  You can also add other email accounts to your Mac by going to System Preferences>Mail,Contacts,Calendars and clicking on the "+" sign on the bottom of the left sidebar.  If you added these other email accounts to your Mac before you upgraded to Mountain Lion, these were simply maintained on your Mac after you upgraded.

  • I once created an account and changed meanwhile my Apple ID. Now, when trying to log in to iCloud, I get the message: "You are already logged in". I cannot get access to the account in the way, that, for example, the options appear on the right hand side.

    I once created an account and changed meanwhile my Apple ID. Now, when trying to log in to iCloud, I get the message: "You are already logged in". I cannot get access to the account in the way, that, for example, the options appear on the right hand side.
    What can I do?

    Thank you, pvonk, but:
    To be more precise: I am talking about the logging-in within the System Preferences on my iMac.
    When trying to log in with the old ID, I get no access, i.e. it says "Try again"...-Trying the same with the new one gives me the result I mentioned in my first question...
    Now I found out how to do it: I had to erase all accounts-then I could sign in with my Apple-ID. Thanks again.

  • My mini ipod appears off and not respond to any commands when pressed the buttons to reset, apple logo appeared and then the apple support site and it shuts down. already tried all the steps, but none worked, and when I plug it into my computer it does no

    My mini ipod appears off and not respond to any commands when pressed the buttons to reset, apple logo appeared and then the apple support site and it shuts down. already tried all the steps, but none worked, and when I plug it into my computer it does not appear in the iTunes bar. what do I do?

    If MacKeeper corrupted the Recovery partition then even I underestimated its potential for damage. Garbage "cleaning" apps will cause misery but I have not found that the Recovery partition to have been affected by using MacKeeper or anything like it. I doubt that it did so, but I have learned not to underestimate the potential for such things to result in system corruption.
    Before concluding your Mac has a hardware failure, try booting OS X Internet Recovery by holding command option r on startup (three fingers). That will force your iMac to bypass the Recovery partition altogether, and convey the ability to create a new one.
    An Internet connection will be required (wired or wireless).
    At the Mac OS X Utilities screen, select Disk Utility. Select your startup volume (usually named "Macintosh HD") and click the Repair Disk button. Describe any errors it reports in red. If Disk Utility reports "The volume Macintosh HD appears to be OK" in green then you can be reasonably (though not completely) assured your hard disk is in good working order.
    Assuming the HD remains usable you can then use Disk Utility to erase it. Reinstall OS X, restore your essential software and other files, and don't reinstall the junk.

  • How to changed old apple ID in AppStore? I've already creat new one's but when I go to the AppStore the old apple ID always appear. Hope you can answer my question. Thanks godbless

    How to changed old apple ID in AppStore? I've already creat new one's but when I go to the AppStore the old apple ID always appear. Hope you can answer my question. Thanks godbless

    No, your accounts will remain separate, any content that you download via either account will be tied to that account - so each account will only be able to authorise its own downloads on your computer's iTunes, redownload them, download updates to its apps, and make in-app purchases in its apps.
    Is there are particular reason why you've created a new account ? If it's due to, for example, no longer having access to your old email account then you can update the email address on an account by tapping on the id in Settings > iTunes & App Store and selecting 'view apple id' on the popup and logging into it, via the Store > View Account menu option on a computer's iTunes (click the Edit button to the right of your id at the top of your account's screen), or via http://appleid.apple.com . If you want to re-use the email address on the account that you've just created then you will need to change that first

  • Here.  Hi I buy pack but the problem is you already purchased in-app purchased but it hasn't been downloaded pls fix it for me and I buy before 15 days pack 19,99 and 4,99 and the same problem  in game world strike

    Hi I buy pack but the problem is you already purchased in-app purchased but it hasn't been downloaded pls fix it for me and I buy before 15 days pack 19,99 and 4,99 and the same problem want or were can I fit it pls

    The e-mail for World Strike support is: [email protected]
    You need to contact them with your questions.

  • I've already changed email for my apple id more than 6 months. But 2-3 months ago until now I've recieved and email to ask apple id confirmation from me. I never confirm anything because I don't know,the link's attached, it's legal or illegal.

    Dear Apple support team,
    I've already changed email for my apple id more than 6 months. But 2-3 months ago until now I've recieved and email to ask my apple id confirmation from me about 6-8 emails. I never confirm anything because I don't know,the link's attached, it's legal or illegal.
    The latest link (just be sent to my email 1 hr. ago) : http://www.smartpixeladv.com/proma/Login/index.html 
    Text is:
    Dear Customer,
    We recently noticed an unusual activity in your iTunes account. Please complete the process to confirm your
    informations.
    Confirm Now>
    This link will expire three days after this email was sent.
    If you don’t make this request, your account will be blocked for security reasons.
    Apple Support​
    In my opinion, i think      "http://"   should be   "https://"  right?  Or Apple should show the link on your website  that we can find, re- check and click by ourselve. Or  Apple should do "How to confirm apple id" on your main page. ( in fact  i'm not sure you already done "How to" on your website yes or not, because I cannot find it)
    The apple id is sensitive security, it's concerned personal security and any credit card payment so please understand me that's why i must to interrupt your team to help me to solve this problem. I'm scared my account will be blocked. Please advice me.
    Wassa. (BKK)

    It is a phishing attempt to get your Apple ID and Password.
    You should forward it to Apple : [email protected]

  • I want to open Twitter, but after I type the password, it doesn't open, but the message for saving PW does appear... can you help me?

    I'm using FF on another computer, and pages that I have used in the original have opened, except for Twitter. I give the PW and the message for saving the password appears, but Twitter's HP page doesn't open, instead the registration page is the one that does... I have tried with another system and the page opens, so I know the problem isn't Twitter's, but FF's... can you help me? I want to open Twitter here...

    This issue can be caused by corrupted cookies or cookies that are blocked.
    *check the permissions on the about:permissions page and in "Tools > Page Info > Permissions"
    *https://support.mozilla.org/kb/fix-login-issues-on-websites-require-passwords
    Clear the cache and remove cookies only from websites that cause problems.
    "Clear the Cache":
    *Firefox/Tools > Options > Advanced > Network > Cached Web Content: "Clear Now"
    "Remove Cookies" from sites causing problems:
    *Firefox/Tools > Options > Privacy > "Use custom settings for history" > Cookies: "Show Cookies"

  • HT201272 Help.  I downloaded an episode of a TV Show, but only 30 seconds of it downloaded, and now it won't let me download it.  It thinks I've already downloaded the whole show.  I paid for it, but I can't view it.  It doesn't offer option to redownload

    I downloaded an episode of a TV show (and paid for it), but the download froze and only 30 seconds of it downloaded.  I can't figure out how to download the rest of it.  itunes shows it as already downloaded, and doesn't give an option for re-downloading it.  I have gone to the page where you finish any incomplete downloads, and this one did not show up on it.  I tried deleting the episode (or 30 seconds of the episode from my computer), hoping that I could redownload it, but it still shows up as downloaded & doesn't give me an option to download it. I paid for it, but I can't watch it.  How do I contact a real person or do a live chat or something so I can get this fixed?
    (I'm on an iMac)

    Having the same issue, can someone please enlighten us?

  • Is there any way to create a time machine backup to an external hard drive with content already on it?  I have a hard drive that i have used for pictures but when i try to run a backup it says i need to start from a blank drive. Can i get around it?

    Is there any way to create a time machine backup to an external hard drive with content already on it?  I have a hard drive that i have used for pictures but when i try to run a backup it says i need to start from a blank drive. Can i get around it?

    It would be much better if you had separate drives for the pictures and Time Machine backups.....but, if you want to use the same drive for both purposes, temporarily move the folder with the pictures to another location for safe storage.
    Run the Time Machine backup on the hard drive and verify that everything is working correctly. Time Machine will format the disk for you in Mac OS Extended (Journaled) as part of the backup process.
    Then move the folder with the pictures back to the hard drive with the Time Machine backups.
    When you have tested to make sure that everything is working again, then and only then should you delete the folder with pictures from the temporary storage area.
    Again....it would be much better to keep Time Machine backups on a drive just for that purpose, and other data on another drive for that purpose. This is clearly one of those times when the fact that you can do something does not mean to imply that you should do it.

  • I can't get my password manager working. It remembers passwords for websites but when I enter in a new password (because this had to be changed) or when I have a new username + PW that I wish to save, the password manager does not appear.

    I can't get my password manager working. It remembers passwords for websites but when I enter in a new password (because this had to be changed) or when I have a new username + PW that I wish to save, the password manager does not appear.

    If you updated your existing account then try logging out of it on the iPhone by tapping on the id in Settings > iTunes & App Stores and then log back in and see if that 'refreshes' the account on the iPad.
    If you created a new account then you can log out of the old account and in with the new one as above, but any content that you purchased/downloaded via the old account will remain tied to that old account, and only that old account can re-download its content and download updates to its apps.

Maybe you are looking for