How can i make my scrollpane in a way that at the opening of a frame it doe

How can i make my scrollpane in a way that at the opening of a frame it does not scroll down automatically?
code is below
import java.awt.*;
import javax.swing.*;
import javax.swing.*;
import java.awt.event.*;
import java.net.*;
import javax.swing.JOptionPane.*;
import java.io.*;
import javax.swing.colorchooser.*;
import javax.swing.filechooser.*;
import javax.accessibility.*;
import javax.swing.border.*;
import java.sql.*;
public class Signup extends JFrame
     JLabel p1,p2,p3,p4,p5,p6,uid,upass,cpass,fname,sname,hint,sl,ed,age,adr,cit,zip;
     JTextField uname,fnamet,snamet,hintt,adrt,adrt1,city,zipcode;
     JPasswordField upassw,cpassw;     
     JComboBox sex,education,agegr;
     Signup()
     Container c=getContentPane();
     c.setLayout(null);
     c.setBackground(Color.white);
     /** JPanel c = new JPanel();
     c.setBackground(Color.white);
     int v = ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS;
     int h = ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED;
     JScrollPane jsp = new JScrollPane(c, v, h); ***/
p1=new JLabel("Create Your Icafe!ID",10);
     p2=new JLabel("Personal Information");
     p3=new JLabel("User Address");
     p4=new JLabel("Tell Us About Your Hobbiess (Optional) ");
     p5=new JLabel("Tell us something about what you like. This will help us choose the kind of content to display on           your pages.");
     p6=new JLabel("--------------------------------------------------------------------------------");
uid=new JLabel("User Id");
     upass=new JLabel("Password");
     cpass=new JLabel("Confirmation Password");
     fname=new JLabel("UserName");
     sname=new JLabel("SurName");
     hint=new JLabel("Hint Question");
sl=new JLabel("Sex");
     ed=new JLabel("Education");     
     age=new JLabel("Age Group");     
     adr=new JLabel("Address");
cit=new JLabel("City");
zip=new JLabel("ZipCode");
     uname=new JTextField(10);
     uname.requestFocus();     
     uname.setToolTipText("UserName");
upassw=new JPasswordField(10);
     upassw.setToolTipText("Password");
     upassw.setEchoChar('*');
     cpassw=new JPasswordField(10);
     cpassw.setToolTipText("Confirmation Password");
     cpassw.setEchoChar('*');
     fnamet=new JTextField(10);
     fnamet.setToolTipText("FullName");
     snamet=new JTextField(10);
     snamet.setToolTipText("SurName");
     hintt=new JTextField(10);
     hintt.setToolTipText("Hint Question");     
String[] gender={"[Select one]","Male","Female"};
     sex = new JComboBox(gender);          
String[] edu={"[Select one]","S.S.C","Inter","Graduate","Post Graduate"};
     education= new JComboBox(edu);     
String[] ageg={"[Select one]","0 - 15","16 - 35","36 - 70","70 - 100"};
     agegr= new JComboBox(ageg);     
adrt=new JTextField(15);
     adrt.setToolTipText("Address");
     adrt1=new JTextField(15);
     adrt1.setToolTipText("Address");
     city=new JTextField(15);
     city.setToolTipText("City");
zipcode=new JTextField(15);
     zipcode.setToolTipText("ZipCode");
     p1.setBounds(200,70,160,30);
     uid.setBounds(350,100,160,30);
     uname.setBounds(400,100,160,30);
     upass.setBounds(335,140,160,30);
     upassw.setBounds(400,140,160,30);
     cpass.setBounds(260,180,160,30);
     cpassw.setBounds(400,180,160,30);
     p2.setBounds(200,220,160,30);
     fname.setBounds(330,260,160,30);
     fnamet.setBounds(400,260,160,30);
     sname.setBounds(335,300,160,30);
     snamet.setBounds(400,300,160,30);
hint.setBounds(315,340,160,30);     
hintt.setBounds(400,340,160,30);
     sl.setBounds(370,380,160,30);     
     sex.setBounds(400,380,160,30);
     ed.setBounds(335,420,160,30);     
     education.setBounds(400,420,160,30);
age.setBounds(330,460,160,30);
agegr.setBounds(400,460,160,30);
p3.setBounds(200,500,160,30);
     adr.setBounds(340,540,160,30);
     adrt.setBounds(400,540,160,30);
     adrt1.setBounds(400,580,160,30);
     cit.setBounds(370,620,160,30);
     city.setBounds(400,620,160,30);
zip.setBounds(590,620,160,30);
zipcode.setBounds(640,620,160,30);
     Font font = new Font("SansSerif",Font.BOLD, 12);
     setFont(font);
     c.add(p1);
c.add(uid);
     c.add(uname);     
     c.add(upass);
     c.add(upassw);
c.add(cpass);
     c.add(cpassw);
c.add(p2);
c.add(fname);     
     c.add(fnamet);
c.add(sname);
c.add(snamet);
     c.add(hint);
c.add(hintt);     
c.add(sl);
c.add(sex);
c.add(ed);
     c.add(education);
c.add(age);
     c.add(agegr);
c.add(p3);
c.add(adr);
     c.add(adrt);
     c.add(adrt1);
c.add(cit);
c.add(city);
c.add(zip);
c.add(zipcode);
     setResizable(false);
     //int a=DO_NOTHING_ON_CLOSE;
     //setDefaultCloseOperation(a);
     show();
     setSize(800,500);
// Border raisedBorder = new BevelBorder(BevelBorder.RAISED);     
     setContentPane(c);     
public static void main (String arg[])
     try{
     UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
     }catch(Exception s)
     Signup swu=new Signup();

just try the following:
jsp.getVerticalScrollbar().setValue(0);after inserting and adding all your components. this will set the vertical scrollbar up to the very first line.
regards

Similar Messages

  • How can I make my email boxes smaller, so that all the stuff does not show after I have opemed it?

    The email that I am reading is very large with a lot of stuff that I do not need to see. How can I make my box smaller?

    ''hhennes [[#question-1047185|said]]''
    <blockquote>
    The email that I am reading is very large with a lot of stuff that I do not need to see. How can I make my box smaller?
    </blockquote>

  • HT201363 How can I make an Apple ID without credit card if the "none" tab is not visible to me?

    How can I make an Apple ID without credit card if the "none" tab is not visible to me?
    Help me out please

    Hello, aligt9p. 
    Thank you for visiting Apple Support Communities. 
    To create an Apple ID without a credit card, there is a specific series of steps that have to be processed in order to allow the payment to be set as none on creation of the account.
    Creating an iTunes Store, App Store, iBooks Store, and Mac App Store account without a credit card
    http://support.apple.com/kb/HT2534
    Why can’t I select None when I edit my payment information?
    http://support.apple.com/kb/TS5366
    If the specific steps have not been processed, a credit or debit card will be required to complete the setup the account.
    However, it can be removed and payment method changed to none as long as there is not an outstanding balance.
    iTunes Store: Changing account information
    http://support.apple.com/kb/ht1918
    Cheers,
    Jason H. 

  • I have created a spreadsheet on numbers for ipad with a list of customers as a drop down menu. How can i make their address appear underneath when i select the customer?

    I have created a spreadsheet on numbers for ipad with a list of customers as a drop down menu. How can i make their address appear underneath when I select the customer?
    iselect the customer?

    Hi bazza,
    We won't be able to put the address from a formula into the same cell that you enter the customer's name. We can put the address in the cell under the customers name.
    First let's take James advice and concatenate the address in the address table.
    Here is the formula in G2
    =CONCATENATE(B2&"
    ",C2&"
    ",D2&"
    ",E2)
    It shows this way because after I clicked on B2 and typed [&"] (no brackets) I typed option-return
    This gives you your new line. Then I typed the closing ". I repeated this for the rest of the address.
    Next we want to bring this to your order sheet. I prefer using the two formulas OFFSET and MATCH instead of VLOOKUP.
    base tells OFFSETwhere to start counting from. Click A1.
    row-offset is for the row. we will use MATCH() -1 to give us the row.
    What MATCH does is give you the row number where something is found and you can specify an exact match. I usually construct the MATCH formula first and then cut and paste it into OFFSET. MATCH looks like this: MATCH(A2,Table 1::A,0). A2 is what we are looking for, Table 1A::A is where we are looking (the entire column A), and 0 means we want an exact match. Can you see it inside the OFFSET formula? Notice that we had to subtract 1 from its result.
    column-offset tells OFFSET which column A=0 so we want 6.
    we ignore "rows", "colomns" we don't need them.
    If this seems like too much, just break it down into small pieces.
    quinn

  • How can i make it so every time i save something the date is included in the title?

    how can i make it so every time i save something the date is included in the title?

    More information would be helpful. Are you doing this in an application? If so, what application.

  • HT4914 If my phone's memory is full, mostly due to music, how can I make it to where my IPad holds all the music and remove all of it from my phone without losing any of it??

    If my phone's memory is full, mostly due to music, how can I make it to where my IPad holds all the music and remove all of it from my phone without losing any of it? I recently got an iPad so I now use that as my main source as opposed to my Dell. Yes, I have a Dell that failed me. Miserably.

    Sync your music from your computer to your iPad.  Then delete the music from your iPhone.

  • I have two accounts to my computer as administrator. How can I make it so both accounts have access to the same folders and programs? grateful for answers. Martin

    I have two accounts to my computer as administrator. How can I make it so both accounts have access to the same folders and programs? grateful for answers. Martin

    Obvious question: If you want to have access to the same folders andapplications, why have two accounts? The point of different accounts is that you don't have access to the other person's data.
    Any application in the HD/Applications folder is available in all accounts.
    Sharing data between accounts depends on the material being shared. So, if you can provide more details we maybe able to help you better.
    Regards
    TD

  • How can i lock my iphone in a way that i won't be able to receive any incoming call nor retreive its information?

    How can i lock my iphone in a way that i won't be able to receive any incoming call nor retreive its information?

    In the phrase " i wanna be able to reveive the call without being able to answer nor see who is calling" what do you mean by able to receive the call but not be able to answer it or see who is calling?
    I do not understanhow you can receive the call but not be able to answer or seee who called. If you do not answer it how can you receive it?

  • How can I make my hotmail account delete emails that I delete on my phone?

    How can I make my hotmail account delete the messages that I delete on my Droid 3? I selected the "obey the other program" in my hotmail account, but nothing's being deleted.
    Thanks,
    Cesslie

    You're welcome.     Lots of good info. can be found in this forum; if you can't find what you're looking for in a search, just post another question.  Have fun with your Droid!

  • How can I make an invalid dynamic disk Array available to the OS again

    Hello Storage Pros
    The setup
    I have a Promise VTrak E610f head unit with 2 VTrak 610j expansion units attached to it together giving me over 27 TB of usable storage space.
    At the hardware level I slip the storage into 6 parts containing 7
     1TB disks and had the parts  configured into 6 RAID 6 arrays. In the end; each of the 6 arrays gives me 4.6TB of usable storage space.
    On the OS level, I have the storage attached to 2 servers: Windows server 2008 and windows server 2008 R2 over a Qlogic fiber channel switch. Each of the 6 arrays are viewable as basic disks of 4,6Tb which I went on to configure as a single RAID 0
    spanned volume of 27TB and for that all the disks had to be converted to dynamic.
    The problem
    Now comes the problem: On my first attempt to do a firmware update on the VTrak E610f storage; all the volumes were rendered foreign and I had to import them to be able to use them. Although the import was successful, I lost all the set NTFS permissions
    and SMB share and I had to manually reconfigure them. Upon doing so The OS registered some inconsistencies in the storage and recommended that I ran chkdsk. Since the storage is that big I reluctantly complied and restarted the server.
    The first server was restarted BUT chkdsk did not commence as scheduled, the server powered right up. After logging in to inspect; I discovered - to my surprise, that the disks were now shown as invalid in Disk Manager and were no longer visible to
    the OS. Assuming that maybe a restart of the other server and the storage would set things right, I went ahead to do so but to no avail. After rebooting the entire system (including the storage), the other server also displayed the disks as invalid and were
    no longer visible to the OS as well.
    My question is; how can I make the disk available again from this ‘invalid’ state without losing data?
    What I tried but did not help:
    Taking the disks offline and then online again did not work, after the disks were online again, they still appeared as invalid.
    Reactivating the disks threw an error “operation not allowed on an invalid disk pack”
    Calling support of the storage manufacturer: they did not find anything wrong with the system, after 5 hours we had to stop.
    I fear converting the array from dynamic to basic will destroy all the data.
    HxD is showing no errors in the disks
    If there is any expert out there with helpful tips; your assistance will be greatly appreciate.
    Cheers
    John

    Hello  Shoan
    Thanks a lot for your response and tips. Sorry I could not get back to you in good time for I had to run some of the tests you provided, it took some time to
    thoroughly re-test the system.
    The summary
    The initial firmware upgrade attempt forced 3 disks offline and the other 3 became foreign. I had to re-import them to have access again. after re-importing
    the disks I realized  all NTFS permissions and SMB shares of the folders on the disks had disappeared, but at least the disk was visible and accessible at that point - but not fault free. It was recommened that I let chkdsk run. However rebooting the
    system to allow chkdsk to run did not result in chkdsk running, instead chkdsk did not run and after restart, the OS showed the disks as invalid. And that is still the case now.
    Response to your questions:
    Yes the storage array was (and is still) connected to another server 2008 R2 server when the problem occurred. The second server is also displaying the same problem: the disks are shown as invalid.
    The loss of SMB shares and NTFS permissions occurred after the initial firmware upgrade attempt, some disks (3 out of 6 of them) were forcibly offlined and the other 3 were, suddenly, marked as foreign. In the end, and to have access to the disks
    I had to online the offlined 3 disks and then reimport the rest of them. From the way I understand it, if the upgrade was not the cause, then at least it was the trigger.
    In as far as converting disks from dynamic to basic, I was not in luck so far:
    Three of the companies I have contacted (recommended by promise Technology technician) so far only work with smaller disks like 2TB, 27 TB like I have is so
    far too big.
    I’m not sure converting the disks to basic will help much though, since that would break the single 27 TB volume which the OS was working with into 6 individual
    disks of 4.6 TB. Will I be able to get the data back that was written to just one volume from those 6 individual and unrelated disks?
     Above all, I have connected the RAID storage system to a newly installed Server 2008 R2, the disks are also shown as invalid.
    I have spent more than 17 hours in remote sessions with a Promise Technology technician trying the resolve the issue. From the technician’s side all seems in place with the exception
    that the disks are invalid in the OS.
    I have contacted Microsoft Customer Support service with the issue. Given that Microsoft did not manufacture the storage unit, can they help at this point – or am I better off
    putting my hopes else?
    Your help is always appreciated and again, thanks for your response and advice.
    JohnV

  • How can i make to not be saved everything that i spell?

    How can i remove some spelling on websites and make it to not be saved anymore?
    I hope the question was understand.

    If I understand your problem, do you want to remove some words that you added to your personal dictionary of the spell checker? If that is the problem, see [[using the spell checker]], the "Removing a word you have accidentally added" section gives details of a file that you need to edit to remove the words.

  • I want to create a playlist on an old iPod Nano (I think it's from the second generation), but the computer it was originally linked to via iTunes died years ago.  How can I make a playlist out of existing songs on the iPod?

    Hello there,
    I have an old iPod nano which I think is from the second generation (model number A1199 if that helps) with software at the latest version it can accept, 1.1.3.  I wish to make a playlist out of the songs currently on the iPod, but I can't see any easy way to do that from the iPod itself.  The next logical thought is to do it through iTunes, but the iTunes that was originally synced to the iPod died several years ago now, so I can't access that to make a playlist through (it's a very old iPod).  I do have iTunes currently on this computer, but that's synced with my iPhone and stores different songs which I don't want to be mixed with those from the old iPod (due to the mostly nostalgic nature of the iPod songs).  Is there any way I can either create a new playlist from the iPod itself, or through iTunes without having to sync?  Also note that most of the songs on the old iPod were uploaded to iTunes from CDs and so aren't connected with any iTunes Login.
    Thanks for any help you can give.  Also, I sorta need to create this playlist ASAP so any advice you could give would be much appreciated
    ~Imamadmad

    The old iTunes library was lost with the old PC.  However, it all that music and content is still on your iPod there are many ways you can extract this content from the iPod and import it back into iTunes.
    Your iPod is designed to sync with only one iTunes library at a time.  It will recognize the iTunes library on the new PC as a new library.  If you sync the iPod with this new library, all content will be erased from the iPod and replaced with what is in the new library.  So what you will want to do is copy everything from the iPod to your new iTunes library on your PC first.
    See this older post from another forum member Zevoneer covering the different methods and software available to assist you with the task of copying content from your iPod back to your PC and into iTunes.
    https://discussions.apple.com/thread/2452022?start=0&tstart=0
    B-rock

  • How can i make a new map on my mail? The way apple has in the manual doesn't work!

    I want to make a new map for my mails, but the way tha apple gives in the manual doesn't work!

    If you mean other folders then you need to create them in your email client e.g. in a browser (which you can only do in IMAP accounts, not POP account) - you can't create new folders in the Mail app itself

  • How can I make personalized mailboxes like work, personal stuff on the ipad

    How can I create a folder or personalized mailbox to the mail feature on the iPad...... I have my email with verizon.....there is nowhere to press a plus sign to create a folder or mailbox for work related emails, personal emails, expense emails or such.....can anyone help me!!!!

    You can only create additional mailboxes if your email account is an IMAP account. You tell this by tapping on your account in the mailboxes window -  and in the window that shows your inbox, sent folder, trash folder, etc - there will be an Edit button at the top of that window. If there is no edit button - you do not have an IMAP account and you can't create new mailboxes. If the Edit button is there - tap on it and the tap New Mailbox at the bottom of the window.

  • How can I make a complaint for an App that I bought thru the Mac App Store?

    Hello everybody, I just bought an app few minutes ago and I'm not satisfied with it.  How can I claim to receive my money back? Regards.

    Apple's policy is that all sales are final.
    Mac App Store Support -
    http://www.apple.com/support/mac/app-store/

Maybe you are looking for