How to make a simple form layout without ad RAD tool

I'm trying to make a simple form, but I'm not finding the right layout manager to make the components goes in Y axis. The BoxLayout could solve my problem, if it does not fill all the panel with the components.
My SCCEE:
public class TestSimpleForm extends JPanel {
    JLabel nameLbl = new JLabel("Name:");
    JTextField nameField = new JTextField();
    JButton okBtn = new JButton("OK");
    JButton cancelBtn = new JButton("Cancel");
    public TestSimpleForm() {
     add(nameLbl);
     add(nameField);
     add(okBtn);
     add(cancelBtn);
    public static void main(String[] args) {
     JPanel panel = new TestSimpleForm();
     // if i make it a boxlayout panel, the text field size goes huge
//     panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
     JFrame f = new JFrame();
     f.setContentPane(panel);
     f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
     f.setSize(400, 600);
     f.setLocationRelativeTo(null);
     f.setVisible(true);
}

wellington7 wrote:
..My SCCEE:While I don't know what an SCCEE is, I am very familiar with the SSCCE, and..
public class TestSimpleForm extends JPanel {
.....this code is surely not an SSCCE.
Running tool: Java Compile
/media/disk/projects/numbered/all/TestSimpleForm.java:1: cannot find symbol
symbol: class JPanel
public class TestSimpleForm extends JPanel {
                                    ^
/media/disk/projects/numbered/all/TestSimpleForm.java:3: cannot find symbol
symbol  : class JLabel
location: class TestSimpleForm
    JLabel nameLbl = new JLabel("Name:");
    ^
/media/disk/projects/numbered/all/TestSimpleForm.java:4: cannot find symbol
symbol  : class JTextField
location: class TestSimpleForm
    JTextField nameField = new JTextField();
    ^
/media/disk/projects/numbered/all/TestSimpleForm.java:6: cannot find symbol
symbol  : class JButton
location: class TestSimpleForm
    JButton okBtn = new JButton("OK");
    ^
/media/disk/projects/numbered/all/TestSimpleForm.java:7: cannot find symbol
symbol  : class JButton
location: class TestSimpleForm
    JButton cancelBtn = new JButton("Cancel");
    ^
/media/disk/projects/numbered/all/TestSimpleForm.java:3: cannot find symbol
symbol  : class JLabel
location: class TestSimpleForm
    JLabel nameLbl = new JLabel("Name:");
                         ^
/media/disk/projects/numbered/all/TestSimpleForm.java:4: cannot find symbol
symbol  : class JTextField
location: class TestSimpleForm
    JTextField nameField = new JTextField();
                               ^
/media/disk/projects/numbered/all/TestSimpleForm.java:6: cannot find symbol
symbol  : class JButton
location: class TestSimpleForm
    JButton okBtn = new JButton("OK");
                        ^
/media/disk/projects/numbered/all/TestSimpleForm.java:7: cannot find symbol
symbol  : class JButton
location: class TestSimpleForm
    JButton cancelBtn = new JButton("Cancel");
                            ^
/media/disk/projects/numbered/all/TestSimpleForm.java:17: cannot find symbol
symbol  : class JPanel
location: class TestSimpleForm
     JPanel panel = new TestSimpleForm();
     ^
/media/disk/projects/numbered/all/TestSimpleForm.java:22: cannot find symbol
symbol  : class JFrame
location: class TestSimpleForm
     JFrame f = new JFrame();
     ^
/media/disk/projects/numbered/all/TestSimpleForm.java:22: cannot find symbol
symbol  : class JFrame
location: class TestSimpleForm
     JFrame f = new JFrame();
                    ^
/media/disk/projects/numbered/all/TestSimpleForm.java:24: cannot find symbol
symbol  : variable JFrame
location: class TestSimpleForm
     f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                                ^
13 errors
Exited: 256

Similar Messages

  • How to make a simple form made with adobe Muse work with Godaddy server ?

    Hi
    i'm trying to do a little website for my student (excuse my english) and the simple form simply don't work with godaddy server. I put the-email adress and i receive nothing, like nothing happen. I try to place the gdform instead but muse said i can't do that.
    Do yu have a simple explication or a way around that thank you very much
    the site is www.chbh.org
    Josée Bélanger

    Hi
    Please refer to : forums.adobe.com/docs/DOC-3581 to know, how you may have the forms widget provided with Adobe Muse to work with third party hosting.

  • How to make a ADOBE FORM as interactive??

    Hi experts,
                       Please anybody share how to make a ADOBE FORM interactive ? It means the content of the form ( text field etc.,) can be varied ( selected dynamically ) and also the form should be freeze later , so that it cannot be edited again ,.
                    Thanks in advance!!

    Hi shukla,
    Thanks for u r response.
    Here my problem is i created webdynpro component view with interactive element .And i set the all required properties also like checking enable checkbox ,pdfsourcr,formname allthe requird things i did and i developed one adobeform using sfp tcode. In that form they are some input fields are their. and i activated every thing sucessfully.
       while executing webdynpro app i am getting pdf also.But in that pdf i cant able to fill the input fields..i checked with javascript code , and different layouts also but still it will be not editable in pdf..
    I need the solution for this........ Pls help me, I stucked with thispoint ,and its urgent...
    Regards,
    Venkat.

  • How to make a PDF form with expanding tabel or expanding fields, like in Word.

    How to make a PDF form with expanding tabel or expanding fields, like in Word.

    This is currently not possible in Formscentral. It is something we are working on for the future. Please stay tuned.
    Andrew Yarborough

  • How to make the oracle forms 10g applet or runtime the size of 1024x768?

    Hi,
    Can anyone tell me
    How to make the oracle forms 10g applet or runtime the size of 1024x768?
    Thanks in advans..

    Please post your question in Forms Topic
    Kamran Agayev A. (10g OCP)
    http://kamranagayev.wordpress.com
    [Step by Step install Oracle on Linux and Automate the installation using Shell Script |http://kamranagayev.wordpress.com/2009/05/01/step-by-step-installing-oracle-database-10g-release-2-on-linux-centos-and-automate-the-installation-using-linux-shell-script/]

  • JDialog Problem: How to make a simple "About" dialog box?

    Hi, anyone can try me out the problem, how to make a simple "About" dialog box? I try to click on the MenuBar item, then request it display a JDialog, how? Following is my example code, what wrong code inside?
    ** Main.java**
    ============================
    publc class Main extends JFrame{
    public Main() {
              super();
              setJMenuBar();
              initialize();
    public void setJMenuBar()
         JMenuBar menubar = new JMenuBar();
            setJMenuBar(menubar);
            JMenu menu1 = new JMenu("File");      
            JMenuItem item = new JMenuItem("About");      
            item.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent ae) {
                  // About about = new About(this);
               // about.show();
            menu1.add(item);
         menubar.add(menu1);
    public static void main(String args[]){
         Main main = new Main();
    }** About.java**
    =============================
    import java.awt.*;
    import javax.swing.*;
    public class About extends JDialog{
         JPanel jp_top, jp_center, jp_bottom;
         public About(JFrame owner){
              super(owner);
              setDefaultCloseOperation( DISPOSE_ON_CLOSE );
              Image img = Toolkit.getDefaultToolkit().getImage(DateChooser.class.getResource("Duke.gif"));          
              setIconImage( img );
              setSize(500,800);
              Container contentPane = getContentPane();
             contentPane.setLayout(new BorderLayout());           
             contentPane.add(getTop(), BorderLayout.NORTH);
              contentPane.add(getCenter(), BorderLayout.CENTER);
              contentPane.add(getBottom(), BorderLayout.SOUTH);
              setResizable(false);
               pack();            
               setVisible(true);
         public JPanel getTop(){
              jp_top = new JPanel();
              return jp_top;
         public JPanel getCenter(){
              jp_center = new JPanel();
              return jp_center;
         public JPanel getBottom(){
              jp_bottom = new JPanel();
              jp_bottom.setLayout(new BoxLayout(jp_bottom, BoxLayout.X_AXIS));
              JButton jb = new JButton("OK");
              jp_bottom.add(jb);
              return jp_bottom;
    }

    Code looks reasonable except
    a) the code in the actionPerformed is commment out
    b) the owner of the dialog should be the frame
    If you need further help then you need to create a "Short, Self Contained, Compilable and Executable, Example Program (SSCCE)",
    see http://homepage1.nifty.com/algafield/sscce.html,
    that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.

  • How to make a simple Quiz?

    Could anyone help me with some hints and maybe sample code (or tutorial :)) how to make a simple quiz, with multiple
    answers choices, and a score function.
    //D

    You could for example do it like this:
    import java.io.*;
    class Quiz
    public static void main (String [] args)
    BufferedReader in = new BufferedReader (new InputStreamReader(System.in));
    System.out.println("SUPERQUIZ");
    System.out.println("How many legs does a horse have?");
    System.out.println();
    System.out.println("1");
    System.out.println("2");
    System.out.println("3");
    System.out.println("4");
    int answer = Integer.parseInt(in.readLine());
    if (answer == 4)
    System.out.println("The answer is correct");
    else
    System.out.println("The answer is incorrect");
    This is just a basic program, hope you understand it (hopefully it works).
    �sbj�rn

  • How to make a contact form script

    i need help in how to make a contact form script, and how to
    insert it into dreamweaver ugent

    Does your host support PHP? If so -
    http://sourtea.com/articles.php?ref=30
    Shane H
    [email protected]
    http://www.avenuedesigners.com
    =============================================
    COMING SOON - Infooki [unboxed]:
    http://infooki.sourtea.com/
    Web Dev Articles, photography, and more:
    http://sourtea.com
    =============================================
    Proud GAWDS Member
    http://www.gawds.org/showmember.php?memberid=1495
    Delivering accessible websites to all ...
    =============================================
    "alagie82" <[email protected]> wrote in
    message
    news:em6gmt$q2n$[email protected]..
    >i need help in how to make a contact form script, and how
    to insert it into
    >dreamweaver ugent

  • How to Make a Registration form

    Hi
    Can any one please tell me how to make a registartion form in Oracle9iAS Portal
    for e.g
    Login Id..
    Password..
    First Name..
    etc
    i want to insert data and then login with that user name and password actually in which table should i insert the data .....
    Any other suggestions which can solve the purpose would be of great help
    Please Help!!
    Regards
    Pooja

    In the PDK-Java is Subscriber Registration Portlet (see: http://portalstudio.oracle.com/servlet/page?_pageid=414&_dad=ops&_schema=OPSTUDIO&_mode=3)
    Please, check that one first.
    Regards,
    Jari
    null

  • How to make a simple navigating form

    Hello All,
    i m very new to forms 6i.
    I have created a form having 2 text items and a push buttons prev,nxt to navigate rows in the table..
    To get a single record is ok .. but i want to make a navigating form ..That is by pressing prev button i can b able to c prev row and same by pressing nxt i can c next record..
    Can any one tell me how i can do for da below simple query..
    Select ename,sal from emp;

    Ravi,
    Forms has a built-in called
    next_record;
    previous_record;
    that you can try to navigate in a form.
    I interprested your post in that "c" means "see" and "b" means "be". Not sure if this was your intention, but if it was, please don't use any abbreviations that confuse the content of your question, because not everybody is willing to spend time on wild guesses.
    Frank

  • How to make a contact form in Muse without email box?

    As the title asks, how can I a make a contact form with asking just for name and phone number?
    Thanks
    Pav

    p_nath, hello
    I had the same question for two days, before i find this thread.
    You are described the impossibility of creating form without mandatory fields, but this was clear when i had work expirience in Muse. That's sad, because Muse is very helpful software for non-html users, or beginners (like me) and let not coding.
    So, now question is that: will ever be possible to make these fields option?
    Thank you.
    p.s. Sorry for my english, writing from big, warm (only now) and boozy Russia.

  • How to create a form layout without borders

    hi,
    is there any way to create a form layout with the jsp page rendered without the borders?

    Does the following create a border??
    <hbj:formLayout id="myForm" marginTop="3px" marginRight="30px" marginBottom="5px" marginLeft="3px" width="400px">
         <hbj:formLayoutRow id="Row1" paddingTop="5px" paddingBottom="5px">
              <hbj:formLayoutCell id="Cell11" align="LEFT" paddingLeft="3" paddingTop="2" paddingRight="10" paddingBottom="5" width="10%">
                       <hbj:inputField id="if1" type="string"/>
                     </hbj:formLayoutCell>
         </hbj:formLayoutRow>
    </hbj:formLayout>
    Let me know,
    Regards,
    P.

  • How to make MDI child form

    Dear Seniors,
    I am new to java, I am trying to develop my 1st simple java app using NetBean 6, I have created a MDI form using Swing GUI Forms -> MDI application sample form..
    I also have created a simple form using JFrame, how to make it as MDI child form?
    please help
    Thanks a lot in advance

    my 1st simple java appYou are simply in over your head. Go back to the shallow end of the pool. Slip on some floaties...
    http://java.sun.com/docs/books/tutorial/
    Seriously dude, swing ain't simple, with or without a smartypants GUI building IDE.

  • How to make a table in java without using GUI??

    how can i make a table in java without usinf GUI, just simple codes??
    NAME ID NUMBER ADDRESS STATUS

    If you simply want to store them internally, you don't want to use a table.
    Make a simple class with properties id, name, number, address, status. Then create a Hashtable that indexes instances of the class by id or some other property.

  • How to make embedded HTML form look normal?

    Hello,
    In Muse, if I Insert HTML code with:
    <form action="action_page.php">
    First name:<br>
    <input type="text" name="firstname" value="Mickey">
    <br>
    Last name:<br>
    <input type="text" name="lastname" value="Mouse">
    <br><br>
    <input type="submit" value="Submit">
    </form>
    …the form is displayed in my Muse page.  However, it doesn't look normal, meaning:
    - The text fields have no border and appear to be invisible until you start typing in them.
    - The Submit button size is minimal, wrapping tightly around the text, and there is no border or bevel.
    * I have experimented with specifying an HTML border and width in the above code, with no change in results.
    Basically, this HTML code looks normal in a regular .html page.  However, in a Muse page (with Insert HTML), the visual appearance of the form elements looks abnormal… stripped-down.
    Can anyone suggest a way to add HTML form content and make it look correct?  I don't want to use the Muse Form Widgets, because they all "require" the email field, and I don't want that capability.  Thanks for any suggestions.

    I answered my own problem.
    It seems that the solution is having knowledge of CSS, which I don't.  That's what Muse is supposed to provide, and I'm not a CSS expert.
    At http://www.ronpershing.com/blog/how-to-make-a-custom-contact-form-in-adobe-muse/ , Ron Pershing gives some very simple code on making it all work with Muse.  I'm not affiliated with him or his website, but since he was kind enough to publish a solution, his work should get some attention.

Maybe you are looking for

  • F-53 Post outgoing payment- help

    When a user tries to post and manual outgoing payment using F-53 for a vendor he is getting a warning message “No open items were found” however there are open items for that vendor which are due for payment. I looked into the data he is entering on

  • Using another database table in a query

    Hi,<BR><BR>Iam designing a report in which i have to use a table from another database<BR><BR>my query is <BR><BR>select ev_class_id,ev_id,desc,start_time from tev where start_time > today<BR><BR> and (desc like \'%f\' or desc like \'%m\' or desc lik

  • Can i reorder pages in pages

    can i reorder pages in pages?

  • CDs burned using iTunes won't play in CD Players!!?!!

    Hey Folks, The first song or two will play or have bad sound quality, but after that the cd freezes up and won't play anymore. This happens with the cd player in both of my cars and on my home stereo. I use a lite-on 52X and I can't figure out what's

  • COR8 Trnsn - Order Type to be made blank

    Hi Friends, I have an issue regarding conversion of Planned orders to Process Orders through transaction COR8. The bottom most field, 'Process Order Type' gets populated, by default with the Order Type used just in the previous transaction. Ex. I use