how to add scrollbar to JFrame

how to add scrollbar to JFrame

hello friends

i am making a java application in which i have a frame to which i wanted to add scrollbars but when i add my panel to scrollpane and then add that scrollpane to JFrame than it shows the scrollbar but do not show the scrolling tabs here is my code pls do help me if u can plsssssssssssssssssssssssssssssssssss

try1.java

//package pradeep1;

import java.awt.*; import java.awt.event.*; import java.applet.*; import javax.swing.*; import java.sql.*; import java.lang.String.*; import java.awt.TextField.*;

public class try1 extends JPanel implements ActionListener,ItemListener,TextListener {

int form1row=160,form4row=0;
int form2row=0,form3row=0,form5row=0;
    /*********************for insertion into database *********************/
     String strfirstname=new String();
            String strlastname=new String();
            String strdesirename=new String();
            String strpass=new String();
            String strrepass=new String();
            String stranswer=new String();
            String strrecovery=new String();
            String strmatchword=new String();
            int ch_question;
            int strlocation;
            /*********************************************************/
    ImageIcon img;
    JLabel create,change,image,your,can;
    JComboBox cb;
    Color c;
    JLabel fname,lname,dname,title,exmform1;
    JTextField tfname,tlname,tdname;
    JButton check;
    ButtonGroup ob;
    JRadioButton id1,id2,id3,id4;
    JLabel chooseid;


JLabel pass,repass,dehome,question,exm,exm1,exm2;
JTextField pass1,repass1;
JCheckBox stay,enable,setgoogle;
JComboBox ch;

    JTextField form4question;



String form5str;
JLabel form5ans,form5remail,form5location,form5word,form5if1,form5que,form5exm1,form5exm2,form5exm3,form5exm4,form5exm5,form5img;
JLabel form5term,form5t1,form5t2,form5t3,form5t4,form5t11,form5t22;
JTextField form5ans1,form5remain1,form5matchtext;
JButton form5b,form5accept;
ImageIcon form5img1,form5img2;
JComboBox form5ch;
TextArea form5ta;

    Connection con;
    Statement st;
    ResultSet rs;
    String Actionstr;

try1()
{

        setLayout(null);
    c=new Color(55,145,220);
    //Container cp=getContentPane();
    setBackground(Color.white);
    img=new ImageIcon("googletitle.gif");
    image=new JLabel(img);
    create=new JLabel("Create an Account");
    create.setForeground(c);
    create.setFont(new Font("Times new Roman",Font.BOLD,25));
    change=new JLabel("Change Language:");
    your=new JLabel("your Google Account gives you access to Gmail and other Google services. if you already have");
    can=new JLabel("a Google Account, you can sign in here.");
    your.setFont(new Font("Times new Roman",Font.PLAIN,14));
    can.setFont(new Font("Times new Roman",Font.PLAIN,14));
    cb=new JComboBox();
    cb.addItem("English");
    cb.addItem("Hindi");
    add(cb);
    image.setBounds(30,6,130,70);
    create.setBounds(10,93,210,20);
    cb.setBounds(480,80,110,25);
    change.setBounds(360,80,210,20);
    change.setFont(new Font("Times new Roman",Font.PLAIN,14));
    your.setBounds(10,130,540,20);
    can.setBounds(10,145,510,20);
    your.setFont(new Font("Times new Roman",Font.PLAIN,14));
    can.setFont(new Font("Times new Roman",Font.PLAIN,14));
    add(image);
    add(create);    
    add(cb);
    add(change);
    add(your);add(can);

/************form1********************/ title=new JLabel("Get started with Gmail"); fname=new JLabel("First Name:"); lname=new JLabel("Last Name:"); dname=new JLabel("Desired Login Name:"); exmform1=new JLabel("Examples:jsmith,john.smith"); title.setFont(new Font("Times new Roman",Font.BOLD,18)); exmform1.setFont(new Font("Times new Roman",Font.PLAIN,15)); fname.setFont(new Font("Times new Roman",Font.BOLD,15)); lname.setFont(new Font("Times new Roman",Font.BOLD,15)); dname.setFont(new Font("Times new Roman",Font.BOLD,15)); tfname=new JTextField(8); tlname=new JTextField(8); tdname=new JTextField(8); check=new JButton("Check availability!"); form1row=160; title.setBounds(10,(10+form1row),210,25); fname.setBounds(10,(40+form1row),210,25); lname.setBounds(10,(70+form1row),210,25); dname.setBounds(10,(120+form1row),210,25); tfname.setBounds(160,(40+form1row),230,25); tlname.setBounds(160,(70+form1row),230,25); tdname.setBounds(160,(120+form1row),230,25); exmform1.setBounds(160,(140+form1row),210,25); check.setBounds(160,(180+form1row),180,20); add(title); add(fname); add(lname); add(dname); add(tfname); add(tlname); add(tdname); add(exmform1); add(check); check.addActionListener(this);

/**************FORM3****************/
pass=new JLabel("Choose a password:"); repass=new JLabel("Re-enter password:"); dehome=new JLabel("Default HomePage"); question=new JLabel("Security question:"); exm=new JLabel("Minimum of 8 character s in Length."); exm1=new JLabel("Your default homepage in your browser is the first page that appears when "); exm2=new JLabel("you open your browser."); pass1=new JTextField(8); repass1=new JTextField(8); stay=new JCheckBox("Stay signed in",true); enable=new JCheckBox("Enable Web History",true); setgoogle=new JCheckBox("Set Google as my default homepage",true); ch=new JComboBox(); ch.addItem("Choose a question..."); ch.addItem("What is name of your best Friend from childhood?"); ch.addItem("What was the name of your first teacher?"); ch.addItem("what is the name of your manager at your first job?"); ch.addItem("What was your first phone number?"); ch.addItem("What is your vehicle registration number?"); ch.addItem("Write my own question"); ch.setSelectedIndex(1); form3row=340; pass.setBounds(10,(30+form3row),210,20); pass1.setBounds(160,(30+form3row),230,25); exm.setBounds(160,(55+form3row),230,20);exm.setFont(new Font("Times new Roman",Font.PLAIN,14)); repass.setBounds(10,(85+form3row),210,20); repass1.setBounds(160,(85+form3row),230,25); stay.setBounds(160,(125+form3row),210,20); enable.setBounds(160,(155+form3row),210,20); dehome.setBounds(10,(185+form3row),210,20); setgoogle.setBounds(160,(185+form3row),230,25); exm1.setBounds(160,(210+form3row),460,20); exm1.setFont(new Font("Times new Roman",Font.PLAIN,14)); exm2.setBounds(160,(230+form3row),210,20); exm2.setFont(new Font("Times new Roman",Font.PLAIN,14)); question.setBounds(10,(250+form3row),210,20); ch.setBounds(160,(250+form3row),330,25); ch.addItemListener(this); add(pass); add(repass); add(dehome); add(pass1); add(repass1); add(stay);add(enable); add(exm); add(dehome); add(setgoogle); add(exm2); add(exm1); add(question); add(ch);

            /*********************************************form5***********************/
            form5row=620;
            form5if1=new JLabel("if you forget your password we will ask for the answer to your security");
            add(form5if1);
    form5que=new JLabel("question.");
            add(form5que);
    form5if1.setFont(new Font("Times new Roman",Font.PLAIN,14));
    form5que.setFont(new Font("Times new Roman",Font.PLAIN,14));
    form5ans=new JLabel("Answer:");add(form5ans);
    form5remail=new JLabel("Recovery email:");add(form5remail);
    form5exm1=new JLabel("This address is used to authenticate your account should you ever encounter");
    form5exm2=new JLabel("problems or forget your password.if1 you do not have another email address,");
    form5exm3=new JLabel("you may leave this field blank.");
            add(form5exm1);
            add(form5exm2);
            add(form5exm3);
    form5location=new JLabel("Location:");add(form5location);
    form5word=new JLabel("Word Verification:");add(form5word);
    form5exm4=new JLabel("type the Chracters you see in the picture below.");add(form5exm4);
    form5exm5=new JLabel("Letters are not case-sensative");add(form5exm5);
    form5exm5.setFont(new Font("Times new Roman",Font.PLAIN,14));
    form5img1=new ImageIcon("wordimage.jpg");//add(form5img1);
    form5img2=new ImageIcon("matchimage.jpg");
    form5b=new JButton(form5img2);
    form5img=new JLabel(form5img1);
    form5term=new JLabel("Terms of service:");add(form5term);
    form5t1=new JLabel("Please check the Google Account information you've entered above(feel free");
    form5t2=new JLabel("to change anything you like),and review the Terms of service below.");
    form5t3=new JLabel("With Gmail, you won't see blinking banner ads. Instead, we display ads you");
    form5t4=new JLabel("might find useful that are relevant to the content of your messages.");
    add(form5t1);
            add(form5t2);
            add(form5t3);
            add(form5t4);
            form5ans1=new JTextField(8);
    form5remain1=new JTextField(8);
    form5matchtext=new JTextField(8);
    form5ch=new JComboBox();
    form5ch.addItem("india");
    form5ch.addItem("pakistan");
    add(form5ch);
    form5if1.setBounds(160,5+form5row,330,20);
    form5que.setBounds(160,20+form5row,100,20);
    form5ans.setBounds(10,45+form5row,210,25);
    form5ans1.setBounds(160,45+form5row,270,25);
    form5remail.setBounds(10,80+form5row,210,20);
    form5remain1.setBounds(160,80+form5row,230,25);
    form5exm1.setBounds(160,105+form5row,450,20);
    form5exm2.setBounds(160,120+form5row,450,20);
    form5exm3.setBounds(160,135+form5row,340,20);
    form5exm1.setFont(new Font("Times new Roman",Font.PLAIN,14));
    form5exm2.setFont(new Font("Times new Roman",Font.PLAIN,14));
    form5exm3.setFont(new Font("Times new Roman",Font.PLAIN,14));
    form5location.setBounds(10,160+form5row,210,20);
    form5ch.setBounds(160,160+form5row,280,25);
    form5word.setBounds(10,190+form5row,210,25);
    form5exm4.setBounds(160,190+form5row,230,30);
    form5exm4.setFont(new Font("Times new Roman",Font.PLAIN,14));
    form5img.setBounds(160,210+form5row,210,100);
    form5matchtext.setBounds(160,310+form5row,210,25);
    form5b.setBounds(380,310+form5row,25,25);
    form5exm5.setBounds(160,330+form5row,230,25);
    form5term.setBounds(10,370+form5row,210,25);
    form5t1.setBounds(160,370+form5row,440,25);
    form5t2.setBounds(160,390+form5row,440,25);
    form5t3.setBounds(160,420+form5row,440,25);
    form5t4.setBounds(160,435+form5row,440,25);
    form5t1.setFont(new Font("Times new Roman",Font.PLAIN,14));     
    form5t2.setFont(new Font("Times new Roman",Font.PLAIN,14));
    form5t3.setFont(new Font("Times new Roman",Font.PLAIN,14));
    form5t4.setFont(new Font("Times new Roman",Font.PLAIN,14));
    form5str=new String("Google terms of services \n\n\nwelcome to google");
    form5ta=new TextArea(form5str,200,120);
    form5ta.setBounds(160,470+form5row,450,120);
    form5t11=new JLabel("By clicking on ''i accept''below you are agreeing to the Terms of service above");
    form5t22=new JLabel("and both the program policy and the Private Policy");
    form5t11.setFont(new Font("Times new Roman",Font.PLAIN,14));
    form5t22.setFont(new Font("Times new Roman",Font.PLAIN,14));
    form5t11.setBounds(160,620+form5row,410,25);
    form5t22.setBounds(160,640+form5row,410,25);

    form5accept=new JButton("I accept. Create my account.");
    form5accept.setBounds(210,690+form5row,260,20);




    add(form5if1);
    add(form5que);
    add(form5ans);
    add(form5ans1);
    add(form5remail);
    add(form5remain1);
    add(form5exm1);
    add(form5exm2);
    add(form5exm3);
    add(form5location);
    add(form5exm4);
    add(form5word);
    add(form5img);
    add(form5matchtext);
    add(form5b);
    add(form5exm5);
    add(form5term);
    add(form5t1);
    add(form5t2);
    add(form5t3);
    add(form5t4);
    add(form5ta);
    add(form5t11);
    add(form5t22);
    add(form5accept);
            form5accept.addActionListener(this);
            repass1.addActionListener(this);



}
    public void textValueChanged(TextEvent e)
    {

        String password=pass1.getText();
        String repassword=repass1.getText();
        if(repassword.equals(password))
        {
            JLabel passwordmatch=new JLabel("Password not match");
            add(passwordmatch);
            passwordmatch.setBounds(430,form3row+50,100,25);
        }
    }
public void actionPerformed(ActionEvent ae)
{

    Actionstr=ae.getActionCommand();
    if(Actionstr.equals("Check availability!"))
    {
        chooseid=new JLabel("Choose One Of The USERNAME");
        chooseid.setForeground(Color.red);
        add(chooseid);
        chooseid.setBounds(160,450,200,20);

        form2row=330;
        id1=new JRadioButton("pradeep.kumar11");
        id2=new JRadioButton("p11.kumar");
        id3=new JRadioButton("kumar_pradeep1169");
        id4=new JRadioButton("pradee_kumar1169");
        id1.setBackground(Color.white);
        id2.setBackground(Color.white);
        id3.setBackground(Color.white);
        id4.setBackground(Color.white);

        ob=new ButtonGroup();
        ob.add(id1);
        ob.add(id2);
        ob.add(id3);
        ob.add(id4);
        id1.setBounds(160,(30+form2row),210,22);
        id2.setBounds(160,(50+form2row),210,22);
        id3.setBounds(160,(70+form2row),210,22);
        id4.setBounds(160,(90+form2row),210,22);
        add(id1);
        add(id2);
        add(id3);
        add(id4);
        repaint(); 

        form3row=form2row+120;
        pass.setBounds(10,(30+form3row),210,20);
        pass1.setBounds(160,(30+form3row),230,25);
        exm.setBounds(160,(55+form3row),230,20);exm.setFont(new Font("Times new Roman",Font.PLAIN,14));
        repass.setBounds(10,(85+form3row),210,20);
        repass1.setBounds(160,(85+form3row),230,25);
        stay.setBounds(160,(125+form3row),210,20);
        enable.setBounds(160,(155+form3row),210,20);
        dehome.setBounds(10,(185+form3row),210,20);
        setgoogle.setBounds(160,(185+form3row),230,25);
        exm1.setBounds(160,(210+form3row),460,20);
        exm1.setFont(new Font("Times new Roman",Font.PLAIN,14));
        exm2.setBounds(160,(230+form3row),210,20);
        exm2.setFont(new Font("Times new Roman",Font.PLAIN,14));
        question.setBounds(10,(250+form3row),210,20);
                    form4row=250+form3row;
        ch.setBounds(160,(250+form3row),330,25);
                    this.setSize(620,2000);
                    form5row=form3row+290;

    form5if1.setBounds(160,5+form5row,330,20);
    form5que.setBounds(160,20+form5row,100,20);
    form5ans.setBounds(10,45+form5row,210,25);
    form5ans1.setBounds(160,45+form5row,270,25);
    form5remail.setBounds(10,80+form5row,210,20);
    form5remain1.setBounds(160,80+form5row,230,25);
    form5exm1.setBounds(160,105+form5row,450,20);
    form5exm2.setBounds(160,120+form5row,450,20);
    form5exm3.setBounds(160,135+form5row,340,20);
    form5location.setBounds(10,160+form5row,210,20);
    form5ch.setBounds(160,160+form5row,280,25);
    form5word.setBounds(10,190+form5row,210,25);
    form5exm4.setBounds(160,190+form5row,230,30);
    form5img.setBounds(160,210+form5row,210,100);
    form5matchtext.setBounds(160,310+form5row,210,25);
    form5b.setBounds(380,310+form5row,25,25);
    form5exm5.setBounds(160,330+form5row,230,25);
    form5term.setBounds(10,370+form5row,210,25);
    form5t1.setBounds(160,370+form5row,440,25);
    form5t2.setBounds(160,390+form5row,440,25);
    form5t3.setBounds(160,420+form5row,440,25);
    form5t4.setBounds(160,435+form5row,440,25);
    form5t11.setBounds(160,620+form5row,410,25);
    form5t22.setBounds(160,640+form5row,410,25);
    form5accept.setBounds(210,690+form5row,260,20);
             repaint();

    }

            if(Actionstr.equals("I accept. Create my account."))
            {   System.out.println("karan");
                boolean var_error=errorcheck();
                if(var_error==true)
                {
                        try
                        {
                            Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                            con=DriverManager.getConnection("jdbc:odbc:gmaildata");
                            st=con.createStatement();
                            rs=st.executeQuery("select * from login");
                            st.executeUpdate("INSERT INTO login VALUES('"+strdesirename+"','"+strfirstname+"','"+strlastname+"','"+strpass+"','"+ch_question+"','"+stranswer+"','"+strrecovery+"','"+strlocation+"'");
                            /*while(rs.next())
                            {
                                System.out.println();
                            }*/
                            con.close();
                            st.close();

                            repaint();


                        }catch(Exception e){}
                }


            }
}
    public boolean errorcheck()
    {
             boolean flag=true;
             JLabel firstname,desirename,lastname,answer,recoverymail;
             firstname=new JLabel("EMPTY FIELD...");
            lastname=new JLabel("EMPTY FIELD...");
             desirename=new JLabel("EMPTY FIELD...");
             answer=new JLabel("PROVIDE A ANSWER...");
             recoverymail=new JLabel("PROVIDE RECOVERY MAIL ");

            strfirstname=tfname.getText();
            strlastname=tlname.getText();
            strdesirename=tdname.getText();
            strpass=pass1.getText();
            strrepass=repass1.getText();
            stranswer=form5ans.getText();
            strrecovery=form5remail.getText();
            ch_question=ch.getSelectedIndex();
            strlocation=form5ch.getSelectedIndex();
            strmatchword=form5matchtext.getText();
            System.out.println(tfname.getText());
            System.out.print(strlastname);
            System.out.println("thik hai");
            if(strfirstname.length()==0)
            {
                flag=false;
                System.out.println("fistname\n");
                add(firstname);
                firstname.setForeground(Color.red);
                firstname.setBounds(430, form1row+40, 180, 25);
            }
            if(strlastname.length()==0)  
            {
                flag=false;
                System.out.println("lastname\n");
                add(lastname);
                lastname.setForeground(Color.red);
                lastname.setBounds(430, form1row+70, 180, 25);
            }
            if(strdesirename.length()==0)
            {
                flag=false;
                System.out.println("desirename\n");
                add(desirename);
                desirename.setForeground(Color.red);
                desirename.setBounds(430, form1row+120, 180, 25);
            }

                if(!(strpass.equals(strrepass)))
                {
                    flag=false;
                    JLabel labelmatch=new JLabel("PASSWORD NOT MATCHES");
                    add(labelmatch);
                    labelmatch.setForeground(Color.red);
                    labelmatch.setBounds(430,form3row+85,180,25);
                }


            if(stranswer.length()==0)
            {
                flag=false;
                System.out.println("answer");
                add(answer);
                answer.setForeground(Color.red);
                answer.setBounds(460,form5row+44,180,25);
            }
            if(strrecovery.length()==0)
            {
                flag=false;
                System.out.println("recovery mail");
                add(recoverymail);
                recoverymail.setForeground(Color.red);
                recoverymail.setBounds(420,form5row+80,180,25);

            }
              repaint();      

        if(flag==false)
                return false;
        else 
            return true;
        //}catch(Exception exception){}/




    }
   public void itemStateChanged(ItemEvent ii)
   {
       int i=ch.getSelectedIndex();
       if(i==6)
       {
            form4row=form3row+290;
        form4question=new JTextField(8);
        JLabel ll=new JLabel("Your own question");
        add(ll);
            ll.setBounds(10,form4row,90,25);
    form4question.setBounds(160,form4row,330,25);
    add(form4question);
            form5row=form4row+40;
            form5if1.setBounds(160,5+form5row,330,20);
    form5que.setBounds(160,20+form5row,100,20);
    form5ans.setBounds(10,45+form5row,210,25);
    form5ans1.setBounds(160,45+form5row,270,25);
    form5remail.setBounds(10,80+form5row,210,20);
    form5remain1.setBounds(160,80+form5row,230,25);
    form5exm1.setBounds(160,105+form5row,450,20);
    form5exm2.setBounds(160,120+form5row,450,20);
    form5exm3.setBounds(160,135+form5row,340,20);
    form5location.setBounds(10,160+form5row,210,20);
    form5ch.setBounds(160,160+form5row,280,25);
    form5word.setBounds(10,190+form5row,210,25);
    form5exm4.setBounds(160,190+form5row,230,30);
    form5exm4.setFont(new Font("Times new Roman",Font.PLAIN,14));
    form5img.setBounds(160,210+form5row,210,100);
    form5matchtext.setBounds(160,310+form5row,210,25);
    form5b.setBounds(380,310+form5row,25,25);
    form5exm5.setBounds(160,330+form5row,230,25);
    form5term.setBounds(10,370+form5row,210,25);
    form5t1.setBounds(160,370+form5row,440,25);
    form5t2.setBounds(160,390+form5row,440,25);
    form5t3.setBounds(160,420+form5row,440,25);
    form5t4.setBounds(160,435+form5row,440,25);
    form5ta.setBounds(160,470+form5row,450,120);
    form5t11.setBounds(160,620+form5row,410,25);
    form5t22.setBounds(160,640+form5row,410,25);
    form5accept.setBounds(210,690+form5row,260,20);

       }

}

and

mainframe.java

import java.awt.*; import java.awt.event.*; import javax.swing.*;

public class mainframe {

public static void main(String args[])
{
    JFrame jf=new JFrame("hello");
    JPanel ob=new try1();
    JScrollPane scrollBar=new JScrollPane(ob,JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);  
    jf.add(scrollBar);
    jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    jf.setSize(800,700);
    jf.setVisible(true);    
}

}

View Answers

September 1, 2011 at 10:21 AM

import java.awt.*;
import javax.swing.*;

public class AddScrollBarToJFrame{
  public static void main(String args[]) {
    JScrollBar bar1 = new JScrollBar(JScrollBar.HORIZONTAL);
    JScrollBar bar2 = new JScrollBar(JScrollBar.VERTICAL);
    JFrame frame = new JFrame();
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    Container contentPane = frame.getContentPane();
    contentPane.add(bar1, BorderLayout.SOUTH);
    contentPane.add(bar2, BorderLayout.EAST);
    frame.setSize(300, 150);
    frame.setVisible(true);
  }
}









Related Tutorials/Questions & Answers:
how to add scrollbar to JFrame
how to add scrollbar to JFrame  hello friends i am making a java application in which i have a frame to which i wanted to add scrollbars but when i add my panel to scrollpane and then add that scrollpane to JFrame than
how to add scrollbar to JFrame
how to add scrollbar to JFrame  hello friends i am making a java application in which i have a frame to which i wanted to add scrollbars but when i add my panel to scrollpane and then add that scrollpane to JFrame than
Advertisements
how to add scrollbar to JFrame
how to add scrollbar to JFrame  hello friends i am making a java application in which i have a frame to which i wanted to add scrollbars but when i add my panel to scrollpane and then add that scrollpane to JFrame than
how to add scrollbar to JFrame
how to add scrollbar to JFrame  hello friends i am making a java application in which i have a frame to which i wanted to add scrollbars but when i add my panel to scrollpane and then add that scrollpane to JFrame than
how to add scrollbar to JFrame
how to add scrollbar to JFrame  hello friends i am making a java application in which i have a frame to which i wanted to add scrollbars but when i add my panel to scrollpane and then add that scrollpane to JFrame than
how i can add an horizontal scrollbar at my PdfAnnotation ? - JSP-Servlet
how i can add an horizontal scrollbar at my PdfAnnotation ?  How to add the an horizontal scrollbar at my PdfAnnotation ? for example document d=new document(0. document.open
in my project, i have to add only vertical scrollbar to a panel,but not horizontal scrollbar. i need some example on it,how to doit.
in my project, i have to add only vertical scrollbar to a panel,but not horizontal scrollbar. i need some example on it,how to doit.  in my project, i have to add only vertical scrollbar to a panel,but not horizontal scrollbar
how to add the scrollbar to the pdf page when generating the pdf file from jsp - JSP-Servlet
how to add the scrollbar to the pdf page when generating the pdf file from jsp  I am not able to see all the columns when i generated the pdf file from jsp.i have 12 colums so how to add the scrollbar
scrollbar
scrollbar  I add a scrollbar to my Frame and its not working
how to reset JFrame
how to reset JFrame  how to reset JFrame
How set the height of Thumb in Vertical scrollbar..?
How set the height of Thumb in Vertical scrollbar..?  I have created a Vertical scrollbar. I have removed up arrow and down arrow. also i have... as image size. How can i do that..? PDR
how to move label in jframe in java?
how to move label in jframe in java?  please any one can give me code for moving a java label in Jframe
vertical scrollbar but without a horizontal scrollbar
vertical scrollbar but without a horizontal scrollbar  How do I make a frame with a vertical scrollbar but without a horizontal scrollbar
How to Collapse Dropdowns on mouseclick on scrollbar in Safari Browser using javascript
How to Collapse Dropdowns on mouseclick on scrollbar in Safari Browser using javascript  How to Collapse Dropdowns on mouseclick on scrollbar in Safari Browser using javascript
JFrame
Jframe. How can i do it. Please help me to do it. Or what else can i have
JFrame
JFrame  write an application with a JFrame that five labels describing reasons that a customer might not buy your product(for example "Too expensive") every time the user clicks a Jbutton, remove one of the negative reasons
jframe
jframe  Create a JFrame for the Summervale Resort. Allow the user to view the information about different rooms available, dining options and activities offered. Include at least two options in each menu and display appropriate
frame with a vertical scrollbar but without a horizontal scrollbar.
frame with a vertical scrollbar but without a horizontal scrollbar.  How do I make a frame with a vertical scrollbar but without a horizontal scrollbar
Horizontal Scrollbar
Horizontal Scrollbar  How can I implement a horizontal scrollbar
jframe
jframe  how to create a jframe.provide me the java code pls
Scrollbar
Scrollbar       A scrollbar is represented by a "slider" widget. The characteristics of it are specified by integer values which are being set at the time of scrollbar
How to create file from input values in Jframe ?
How to create file from input values in Jframe ?  hi i m doing my... an object for it.my java code is public class submit { JFrame frame; JTextArea text1; void form() { frame=new JFrame("details you have entered are"); JPanel
how to draw a table on jframe in java - Java Beginners
how to draw a table on jframe in java  how to draw a table on jframe in java?  Hi friend, import java.awt.*; import... scrollPane = new JScrollPane(table); JFrame frame = new JFrame
Java Scrollbar
Java Scrollbar   What is the difference between a Scrollbar and a ScrollPane
How to get Scrollbar value of textarea in html? - Design concepts & design patterns
How to get Scrollbar value of textarea in html?  Hi All, I have one registration page with terms & policy in read only textarea (Html input tag..., submit button should not be enable. Question : How to read scroll bar value
scrollbar - applet - Applet
Scrollbar (Scrollbar.VERTICAL, 0, 8, -100, 100); add(sb...); add("North", scrollbar); s = "50"; Font font = new Font...scrollbar - applet  Hi!! It is the program for a vertical scroll
menu with scrollbar
menu with scrollbar  I want to use MenuBar with Scrollbar. I tried it. I dont know how to do it. so please help me. The program should be.... 1.add... java.awt.*; public class menu extends JFrame { MenuBar bar; Menu file,setting,rate,help
Scrollbar problem with struts <layout:collection>
Scrollbar problem with struts   How activate the vertical scrollbar in struts in mozilla firefox
how to use a JInternalFrame in a JFrame to create a chat window in a client/server app?
how to use a JInternalFrame in a JFrame to create a chat window in a client/server app?  how to use a JInternalFrame within a JFrame? i want to create a client/server app. i know that JIternalFrame should be used
how to open one Jframe from main method call
how to open one Jframe from main method call  I have downloaded...(is a JFrame) Rules.java(is a JFrame) PlayGame.java have three buttons Play - i... Rules.java Jframe should be opened Exit - exits the application Now what i want
Refresh JFrame
Refresh JFrame  How to refersh a JFrame and its componets
CSS ScrollBar Properties
CSS ScrollBar Properties  How can i set ScrollBar properties in CSS? I am using HTML, CSS and Div in my code. Thanks!!   overflow: scroll; overflow-y: scroll; overflow-x: scroll; overflow:-moz-scrollbars-vertical
Horizontal Scrollbar
Horizontal Scrollbar  I am creating a JSF project that has a print("<af:table/>"); the table is too wide to display in the browser. I was wondering if there was anyway to implement a horizontal scrollbar in this table so
scrollbar in JPanel
scrollbar in JPanel  Scroll bar is not working when i am using the panel layout is null. If i change the panel layout to flow or grid its working. I..., JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);f.add(s
how to handle action events in case of more than one JFrame
how to handle action events in case of more than one JFrame   I have downloaded a snake game project from the internet, initially this project... is not moving and i am not getting to point how to resolve this problem .. So
Flex scrollbar control
Flex ScrollBar Control:- If the user handles data that are displayed but data is too much and not fit in the display area then the user use ScrollBar... the button depends on the current state of the ScrollBar controls. If user Example
Hiding a JFrame
javax.swing.*; import java.awt.event.*; class PassData extends JFrame { JTextField...); b.setBounds(120,40,80,20); add(l); add(text); add(b... java.awt.*; import java.awt.event.*; class NextPage extends JFrame { NextPage
Hiding a JFrame
javax.swing.*; import java.awt.event.*; class PassData extends JFrame { JTextField...); b.setBounds(120,40,80,20); add(l); add(text); add(b... java.awt.*; import java.awt.event.*; class NextPage extends JFrame { NextPage
java program:scrollbar
java program:scrollbar  my program logic is that when i scrolling scrollbar according to that the oval shap is changed by fetching the value of scrollbar the oval is drawn please give me a proper code of this logic
How to add
How to add   Hi, I want to make a website which will recommend users books according to the genre selected by them. I am using PHP, JavaScript and mySQL. The problem is that there will me almost more than 100 books
how to show search results in the same panel of jframe to where search field and button is present..
how to show search results in the same panel of jframe to where search field... ,In the given code search results is being displayed in the other jframe. But in my application i need to show search results in the same panel of jframe to where
div to scrollbar - Java Beginners
size is larger than main window at that time that div should automatically add vertical scrollbar. for this i am using a css for that div in which i tried to add... if i add some items and there is a link on which when i hover it shows
Visibal Certical scrollbar with struts collection layout.
Visibal Certical scrollbar with struts collection layout.  how to Visibal Vertical scroll bar with struts collection layout
refresh checkbox jframe
refresh checkbox jframe  How to refresh checkbox button in JFrame
jframe background color not showing
jframe background color not showing  jframe background color is not showing. please suggest.   Just add the background color to JPanel and then add it to JFrame. For example .. JFrame myFrame = new JFrame(); JPanel
How to open textfields in the the same panel of the jframe by selcting from dropdown menu option ...
How to open textfields in the the same panel of the jframe by selcting from... the textfields and submit button in the same panel of the jframe window . Below is my code which is displaying textfields in the other jframe. KIndly help me sir
How can I Define a JFrame subclass that has four vertically positioned buttons. - Java Beginners
How can I Define a JFrame subclass that has four vertically positioned buttons.  How can I Define a JFrame subclass that has four vertically...*; public class DisplayButtons extends JFrame { int i=0; static JPanel panel
how to show search results in the same panel of jframe to where search field and button is present..
how to show search results in the same panel of jframe to where search field... JTable(); final JScrollPane pane=new JScrollPane(table); JFrame f = new JFrame(); lab.setBounds(10,10,100,20); t.setBounds(120,10,100,20
Java Image On JFrame Title
How to set Image On JFrame In this section, you will learn how to set an image on JFrame title using Java program. For this, we have created an object of JFrame class. Then, we have used Toolkit.getDefaultToolkit().getImage
Removing the Title Bar of a JFrame
Removing the Title Bar of a JFrame  How to remove the Title Bar of a JFrame in Swing Application?   Please check the tutorial Removing the Title Bar of a Frame for the source code and example description. Thanks

Ads