Please help with the GUI quiz question!

Hi Folks,
Please help me with the code for the following GUI.
The display window of the application should have two panels at the top level (you could have multiple panels contained within a top-level panel). The first top level panel should have a grid or a border layout and should include apart from various label objects: 1) a textfield to store the info entered, 2) a combobox 3) a combobox or a list box , 4) a radio-button group , 5) a combo box 6) checkboxes for additional accessories, and 7) checkboxes .
The second top-level panel that is placed at the bottom of the window should have a submit button, a clear button and a textarea for output.
Thanks a lot.

Please be a little more explicit about what you're doing, what you expect to happen, and what you actually observe.
Please post a short, concise, executable example of what you're trying to do. This does not have to be the actual code you are using. Write a small example that demonstrates your intent, and only that. Wrap the code in a class and give it a main method that runs it - if we can just copy and paste the code into a text file, compile it and run it without any changes, then we can be sure that we haven't made incorrect assumptions about how you are using it.
Post your code between [code] and [/code] tags. Cut and paste the code, rather than re-typing it (re-typing often introduces subtle errors that make your problem difficult to troubleshoot). Please preview your post when posting code.
Please assume that we only have the core API. We have no idea what SomeCustomClass is, and neither does our collective compiler.
If you have an error message, post the exact, complete error along with a full stack trace, if possible. Make sure you're not swallowing any Exceptions.
Help us help you solve your problem.

Similar Messages

  • Hi, please help with the installation of Lightroom 4, I bought a new Mac (Apple) and I want to install a software that I have on the album cd. My new computer does not have the drives. Can I download software from Adobe? Is my license number just to be ab

    Hi, please help with the installation of Lightroom 4, I bought a new Mac (Apple) and I want to install a software that I have on the album cd. My new computer does not have the drives. Can I download software from Adobe? Is my license number just to be able to download the srtony adobe.

    Adobe - Lightroom : For Macintosh
    Hal

  • I need help with the GUI nad Graphic 2D....

    Hi
    i'm kind new to java and i have couple of questions... all my questions about the GUI...
    when i want to create a GUI programe , and when i want to draw a graphic with GUI, i do that way(code)
    "public class x1 extends JPanle{
         public void PaintComponent(Graphic g){
    My questions:
    1) why do i have to extend from JPanle ??
    2) Why do i use paintcomponent??? why i couldn't use directly 'Graphic g' ??
    This code i get it from the book, this is how it is done...
    Also, if i want to draw some shapes(rec, circle ..etc) and i want to put Button and organize them, how could i do that???
    i tried to organize the button after i draw the rectangle but i can't... all becaus of the stupid way'the code that i wrote it', i hope there is an alternative way.
    My last question... how can i change the font ???
    i want to use 'sans comic'...
    Thanks alot....

    kiiwii14 wrote:
    i'm kind new to java and i have couple of questions...fair enough.
    all my questions about the GUI...and that's your problem right there.
    Your questions tell me that you're missing quite a few fundamentals of programming in Java. There's nothing wrong with that, everyone starts this way. But if you try to do any GUI programming at your current level you will run head-first into many, many problems that could be easily avoided if you concentrate on learning the basics first.
    when i want to create a GUI programe , and when i want to draw a graphic with GUI, i do that way(code)
    "public class x1 extends JPanle{That code doesn't compile. It's JPanel, not JPanle. Please post only compiling code (or near it, if you've got a question about a compiler error).
         public void PaintComponent(Graphic g){"paintCompontent", not "PaintComponent".
    Oh, and in the future please use the CODE-Button when posting code (1. copy+paste code 2. select code 3. press "CODE" just above the text area).
    My questions:
    1) why do i have to extend from JPanle ??You don't have to. You can, if you want your class to be a specific type of JPanel.
    2) Why do i use paintcomponent??? why i couldn't use directly 'Graphic g' ??How would you "directly use Graphic g"?
    That's the way the framework is written. Components draw themselves using that method. If you want to change how they draw themselves you can override that method.
    Did you read the chapter that tells you this or did you simply copy out the code example? The examples are there to illustrate the points and help you understand. They are not a *substitute* to actually reading the text.
    Also, if i want to draw some shapes(rec, circle ..etc) and i want to put Button and organize them, how could i do that???Finish reading the book, write some basic programs and then work on from there.
    You're trying to learn a feature and produce a useful product at the same time. I can tell you from experience that this is a very bad idea.
    i tried to organize the button after i draw the rectangle but i can't... How did you try?
    all becaus of the stupid way'the code that i wrote it', i hope there is an alternative way.You didn't show us your attempt so we can't tell you any alternative.
    My last question... how can i change the font ???
    i want to use 'sans comic'... Hm ... "Comic Sans" is the name. And that's not a font. [It's a desease|http://bancomicsans.com/].

  • Can anyone please help with the 2.3 update in UK?

    Can anyone please help?  I have an unbranded x10 in the UK.  PC companion constantly tells me my phone software is up to date (with android 2.1) so I cannot upgrade to 2.3.  I've tried all the tips on the SE support page like deleting the database content and looking for the setting to update the phone next time it's connected which doesn't exist (very informative SE!).  I'm not keen on this independent software installation through the rapidshare download, it seems full of glitches looking at the forums.  http://www.sonyericsson.com/update/?lc=en&cc=gb&pid=xperiax10  This link clearly tells us the update is available through PC companion, no joy for me though.  Any help is welcome.

    Have a look at this and check your version number see if its listed
    http://forum.xda-developers.com/showthread.php?t=1186045
    As for generic roms you have probable read about custom roms
    See this thread it is a stock SE rom not a custom rom and will give you just that a stock SE rom if you want
    http://talk.sonyericsson.com/thread/19762

  • Please help with credit card hold question

    I just recently made my own apple id and i would like to know if apps i download will show up, by name, on the credit card hold. I want to download a free app without my parents knowing. My email is associated with the id. Please help.

    cherryqueen2 wrote:
    i had the same problem asked my company they had no answer so now what??
    No answer, what nothing at all? Surely they confirmed that you have the correct number or if it was not, they offered to supply you with a replacement card, with new security code.
    And if you have confirmed with your credit card company that the number you are using is correct, but iTunes doesn't recognise it, I'd say that was down to the credit card company and iTunes to sort it out, not you.
    It's immaterial that you were purchsing free app, you still need a valid credit card.
    Phil

  • Please help with the URL class

    Hello,
    I am trying to write a Java app that will take a url and download it.
    I believe you can do this with the URL class but I don't understand how to. For example, if the http url location points to a picture file, how would I code the app to retrieve this picture and save it to a specified directory?
    Also, is there a way that my java app could open another program, let's say Microsoft Internet Explorer?
    Please be as specific as possible, thanks!

    You'll see below an example to download a file
    private static String copyFile (String url, String nomFichier){
         // construction du fichier de sortie
         File outputFile = new File(repertoire + "\\fichiers\\" + nomFichier);
         // si le fichier existe d�j�, il ne sert � rien de le t�l�charger !
    if (outputFile.exists())
         return "fichiers/" + nomFichier;
              try {     
         HttpURLConnection connect = (HttpURLConnection)new URL(url).openConnection();
    boolean connected = false;
    while (!connected){
    try {
    connect.connect();
    connected = true;
         catch (java.io.IOException e1) { System.out.print("...Tentative de connection"); }     
    DataInputStream reader = new DataInputStream(
    connect.getInputStream());
         FileOutputStream out = new FileOutputStream(outputFile);
         int length = 1024;
         byte[] buf = new byte[length];
         int offset = 0;
         long offsetCourant = 0;
         int nb=0;
         while ((nb=reader.read(buf,offset,length))!= -1) {
              out.write(buf,0,nb);
         out.close();
         catch (java.net.MalformedURLException e) { System.out.println("pb d'url"); }
         catch (java.io.IOException e1) { System.out.println(e1.getMessage()); }
         return "fichiers/" + nomFichier;
    }

  • Please help with the query (INSERT RETURNING BULK COLLECT INTO)

    I am trying to write a query inside the C# code where I would insert values into a table in bulk using bind variables. But I also I would like to receive a bulk collection of generated sequence number IDs for the REQUEST_ID. I am trying to use RETURNING REQUEST_ID BULK COLLECT INTO :REQUEST_IDs clause where :REQUEST_IDs is another bind variable
    Here is a full query that use in the C# code
    INSERT INTO REQUESTS_TBL(REQUEST_ID, CID, PROVIDER_ID, PROVIDER_NAME, REQUEST_TYPE_ID, REQUEST_METHOD_ID, SERVICE_START_DT, SERVICE_END_DT, SERVICE_LOCATION_CITY, SERVICE_LOCATION_STATE, BENEFICIARY_FIRST_NAME,
    BENEFICIARY_LAST_NAME, BENEFICIARY_DOB, HICNUM, CCN, CLAIM_RECEIPT_DT, ADMISSION_DT, BILL_TYPE,
    LANGUAGE_ID, CONTRACTOR_ID, PRIORITY_ID, UNIVERSE_DT, REQUEST_DT, BENEFICIARY_M_INITIAL,
    ATTENDING_PROVIDER_NUMBER, BILLING_NPI, BENE_ZIP_CODE, DRG, FINAL_ALLOWED_AMT, STUDY_ID, REFERRING_NPI)
    VALUES
    (SQ_CDCDATA.NEXTVAL, :CIDs, :PROVIDER_IDs, :PROVIDER_NAMEs, :REQUEST_TYPE_IDs,
    :REQUEST_METHOD_IDs, :SERVICE_START_DTs, :SERVICE_END_DTs, :SERVICE_LOCATION_CITYs,
    :SERVICE_LOCATION_STATEs, :BENEFICIARY_FIRST_NAMEs, :BENEFICIARY_LAST_NAMEs, :BENEFICIARY_DOBs,
    :HICNUMs, :CCNs, :CLAIM_RECEIPT_DTs, :ADMISSION_DTs, :BILL_TYPEs, :LANGUAGE_IDs,
    :CONTRACTOR_IDs, :PRIORITY_IDs, :UNIVERSE_DTs, :REQUEST_DTs, :BENEFICIARY_M_INITIALs,
    :ATTENDING_PROVIDER_NUMBERs, :BILLING_NPIs, :BENE_ZIP_CODEs, :DRGs, :FINAL_ALLOWED_AMTs,
    :STUDY_IDs, :REFERRING_NPIs) RETURNING REQUEST_ID BULK COLLECT INTO :REQUEST_IDs
    However, when I run this query, it gives me a strange error ORA-00925: missing INTO keyword. I am not sure what that error means since I am not missing any INTOs
    Please help me resolve this error or I would appreciate a different solution
    Thank you

    You cannot use (and do not want to in this case) the BULK COLLECT.
    create table for_testing
       the_id      number not null primary key,
       some_data   number
    declare
       l_return_value for_testing.the_id%type;
    begin
      4 
       insert into for_testing
          the_id,
          some_data
       values
          1,
          5
       returning the_id into l_return_value;
       dbms_output.put_line('the return values is ' || l_return_value);
    end;
    20  /
    the return values is 1
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.02
    TUBBY_TUBBZ?Is a simple example. In the future, please use the tags to preserve formatting on your code like i have so it remains readable .                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Please help with the versioncue problem.

    I know this is not the right place to post this but please, I need fast help. When I open a project in Photoshop CS3 it says "Cannot find the missing module blablabla versioncue.dll". I've searched around a little and found someone who said that 2 updates would fix it. I downloaded the updates but when I started to install it said "Can't find the product to update".
    For some extra info, I just reformated comp and I've considered it might be something about missing files or something and if so, can someone add [email protected] and send to me because this is important. This is also because I have a schoolproject where Photoshop will be needed.
    I'm also suspicious if I actually have the documents and settings files for CS3 since I only copied the whole files from programs when I reformated it.
    Please help!

    >since I only copied the whole files from programs when I reformated it.
    you need to do a full install from the original discs david. simply copying the files won't do it.

  • Please help with the understanding of aspect ratio!!!

    Hi all,
    I'm trying to get my head around the 'aspect ratio' thing if anyone can help.
    To give an example, I have imported footage in FCE and in the details of the file it states:
    Pixel Aspect: PAL - CCIR 601
    Frame size: 720 x 576
    What exactly can I earn from the above information?
    I gather this is not widescreen but I would like the end film to be. Do I have to 'crop' this? If so, how!?
    And how do I make sure the picture looks right on a widescreen TV (so the people don't look squashed, say)?
    Many thanks in advanced for the wisdom passed on!
    Adam
    Oh and should i be thinking about this before I'm about to import from a Mini DV cam? As in settings...
    Message was edited by: Vegas Superstar

    If you check the anamorphic box on a 4:3 clip you will see some kind of distortion.
    In general you choose your setup accordingly with the way your footage has been shot.
    In the article you found that iDVD doesn't recognize the "anamorphic" flag that your footage can have in FCE.
    Therefore your exported material must be "arranged" so that you tell iDVD you have a 16:9 movie.
    When you work entirely in anamorphic 16:9 in FCE (your footage was shot in 16:9 and have the anamorphic flag on), when you export the sequence using export to quick time movie, you'll get a 720x576 PAL movie. Because iDVD will not translate the anamorphic flag, you have to manually change the movie size to 1024x576 for PAL, so that your resultant movie will be keeping the 16:9 aspect ratio.
    The native widescreen doesn't use such flag and the video is already at 16:9 aspect ratio.
    That's has to deal with pixel that are rectangular and not square as computer uses.
    I guess someone else will be more specific and detailed on this.
    Regards,
    Armando.

  • Please help with the sql logic

    The below is going to be a record set from for a view from the FROM CLAUSE
    1. Find component DOCUMENT where the document type = Square Metres (DOC.UOM_STD_ID = 'METR_MTR) If any components are found, retrieve the Document records for these components ONLY.
    2. Otherwise, if no components exist with a Document type = Square Metres, look for components with a Document type of Acres (DOC.UOM_STD_ID = 'ACRE'). If found, retrieve the Space Lease records for these components ONLY.
    3. Otherwise, if the Document does not have components with a type = Square Metres or Acres, look for components with the type of (DOC.UOM_STD_ID = 'PARK'). Then retrieve the departments associated with these parking components.
    For Space Lease records above, retrieve the associated Org ID (SPACE.SPORG).
    Return all departments where
    the associated Org Type (ORG.ORGCLASS) = 'NON'
    or the associated Org Type (ORG.ORGCLASS) = 'GD'
    Thank you

    maybe something like:
    SQL> select emp.empno, emp.ename, emp.deptno
      2    from emp,
      3         (select case when (select 1 from emp where deptno = 10 and rownum  = 1) = 1 then 1
      4                      when (select 2 from emp where deptno = 60 and rownum  = 1) = 2 then 2
      5                      else 3
      6                 end case_col
      7            from dual) d1
      8   where deptno = decode(d1.case_col,1,10,
      9                                     2,60,
    10                                     3,70);
         EMPNO ENAME          DEPTNO
          7839 KING               10
          7782 CLARK              10
          7934 MILLER             10
    SQL> in you code it will be something like:
    select ...
       from document t1,        
            (select case when (select 1 from document doc where DOC.UOM_STD_ID = 'METR_MTR' and rownum  = 1) = 1 then 1
                         when (select 1 from document doc where DOC.UOM_STD_ID = 'ACRE' and rownum  = 1) = 2 then 2
                         else 3
                    end case_col
               from dual) d1
    where t1.uom_std_id = decode(d1.case_col,1,'METR_MTR',
                                             2,'ACRE',
                                             3,'PARK',
                                               null);note: untested

  • Please help with the FOR loop and the array..

    I was trying to place some words in the Movie Clip
    "TextPanel" and set a
    random position to each of them.
    But it's not working.
    1) I created a Movie Clip "word" and inside that MC I created
    a text field
    and gave it an identifier "textFiled".
    2) The linkage name for Movie Clip "word" I set to "word".
    3) In the actionscript I created an Array called "aWords".
    4) Then I created a FOR loop that should
    place (attach) Movie Clips "word0", "word1", "word2" and
    "word3" to the
    movie clip TextPanel, and set the textField text for each of
    them to the
    text from the Array.
    But the script attaches 4 Movie Clips with a name
    "Undefined", instead of 4
    different names (from the Array).
    What is wrong with this script?
    var aWords:Array = [apple,banana,orange,mango];
    for(i=0;i<aWords.length;i++){
    var v = TextPanel.attachMovie("word","word"+i,i);
    v.textFiled.text = aWords
    v._x = randomNumber(0,Stage.width);
    v._y = randomNumber(0,Stage.height);
    Thanks in advance

    But in my Post I already wrote v.textFiled.text = aWords
    so I don't understand what were you correcting..
    And one more:
    I have tested it by changing the
    v.textFiled.text = aWords; to v.textFiled.text = "some
    word";
    and it's working fine.
    So there is something wrong with the Array element, and I
    don't know why..
    "aniebel" <[email protected]> wrote in
    message
    news:ft2d5k$lld$[email protected]..
    > Change:
    > v.textFiled.text = aWords;
    >
    > to:
    > v.textFiled.text = aWords
    >
    > It needs to know which element inside the array you want
    to place in the
    > textfield (or textfiled) :)
    >
    > If that doesn't work, double check that your instance
    name is correct
    > inside
    > of "word".
    >

  • Hello to all! Please help with the question from China!!!Thanks a lot!

    I am a real beginner on Java studing and I try to learn this all by myself.I had read some books translated from English format.But I dont think they were translated good enough.Sometime the meaning translated from English is totally different from what the Author want to express.So can you help to recommend some good English books for the beginner.I want to get start my studing on these books.Thanks in advance.

    I used Thinking in Java 2 by Horton. I see there's an upcoming edition covering the new version 5 of Java,
    http://www.amazon.com/exec/obidos/tg/detail/-/0764568744/qid=1103190687/sr=1-2/ref=sr_1_2/103-0972736-0816625?v=glance&s=books
    In addition to the above I also bought The Java Programming Language by Gosling and others. It's not a tutorial. Instead it offers much in-depth information on why things are the way the are in Java. I didn't use much at first and found it quite impenetrable, but now I use it all the time especially when answering so called "I have a doubt" questions at this forum. -:) I think any serious Java developer should have a copy but not necessarily when starting out. The Horton tome will keep you busy for a while. And don't forget the on-line tutorials. If find the Swing tutorial especially valuable.

  • Please help with the simple servlet

    hi all......
    i am trying to write a servlet that accepts parameters from html and validates it against database and displays if the user is valid or not....
    but my code always displays invalid user..........i don't know where i am going wrong.........kindly help
    html code:
    <html>
    <body>
    <form action=/LoginServlet>
    <p><h1>
    username:<input type=text name=nm>
    <p>password:<input type=text name=pwd>
    <p>
    <input type=submit value=Login>
    </form>
    </body>
    </html>
    servlet code:
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.sql.*;
    public class name1 extends HttpServlet {
         public void doGet(HttpServletRequest req,HttpServletResponse
    res) throws ServletException,IOException {
         try {
         Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
         Connection con =
    DriverManager.getConnection("jdbc:odbc:nmpwd");
         Statement stmt = con.createStatement();
         res.setContentType("text/html");
         PrintWriter out = res.getWriter();
         ResultSet rs;
         String r = req.getParameter("nm");
         String r1 = req.getParameter("pwd");
         String query="select * from namep";
         rs = stmt.executeQuery(query);
         String s="",s1="";
         while(rs.next())
              s = rs.getString(1);
              s1 = rs.getString(2);
         if(r.equals(s)&&r1.equals(s1))
              out.println("VALID USER");
         else
              out.println("INVALID USER");
         con.close();
         }catch(Exception e) { }
    }

    The JSP code is correct. Please change the servlet code. I have done the changes. It's Working correctly now.
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.sql.*;
    public class LoginServlet extends HttpServlet
    public void doGet(HttpServletRequest req,HttpServletResponse res) throws ServletException,IOException
              System.out.println("Entered Servlet");
              try
                   Class.forName("oracle.jdbc.driver.OracleDriver");
                   Connection con = DriverManager.getConnection("jdbc:oracle:thin:@bslblrora9i:1521:blrora1","javauser","javauser");
                   res.setContentType("text/html");
                   PrintWriter out = res.getWriter();
                   ResultSet rs=null;
                   String r = req.getParameter("nm");
                   String r1 = req.getParameter("pwd");
                   PreparedStatement stmt=con.prepareStatement("SELECT * FROM NAMEP");
                   rs=stmt.executeQuery();
                   int flag=0;
                   String s="";
                   String s1="";
                   while (rs.next())
                        s=rs.getString(1);
                        s1=rs.getString(2);
                        if (r.equals(s))
                             if (r1.equals(s1))
                                  flag=1;
                   if (flag==1)
                        out.println("valid User");
                   else
                        out.println("Invalid User");
                   con.commit();
                   con.close();
              catch(Exception e)
                   System.out.println("Error "+e);
    }

  • Roberto or other guys please help with the terminology!

    Hi Roberto, when you say In addition to V1 and V2 update, synchronous and asynchronous update from the application documents, you have to perform the V3 update (to download your records from delta queue to extraction queue) that you can schedule , I am a little confused.
    Let me be clear about the terminlogy. Are V1/synchronous/ Direct delta update the same. Are V2/asynchronous/queued delata the same. Can V3 be of 2 types? serialised and unserialised.
    Thanks in advance.
    simmi

    hey Roberto,
    Great! I really appreciate you sending me the Doc. How can I repay your help? Anyhow i will allott full points to you.
    one more help, actually I have been trying to access the SAP help online. but the URL's ending with frameset.htm or index.htm are not openeing up. For example,
    http://help.sap.com/saphelp_nw04/helpdata/en/91/270f38b165400fe10000009b38f8cf/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/bb/bdd69f856a67418962d74bfd7bd8af/frameset.htm
    Is ther any thing that i need to set in my explorer settings?
    simmi

  • Please help with the sync of my ipad2 to OS 5

    I did the back up but restore comes up with ERROR (-10)...restoring from my itunes backup (many attempts and takes an hour or more each time).  If I do a new restore will I lose all photos or are they saved in my itunes backup I did?

    I guess I'm out of luck.  I also noticed my magnetic cover no longer makes the click sound at openning and closing.  Nobody at APPLE store can help me with my sync issue, they say to bring it in.  Ok well if I bring it in and I have my back up on my home computer itunes I don't see how they can actually help me other than tell me what to do when I go home.  It is about 40 miles to drive each way to get there.  I really am frustrated with my apple product .  I'm 3 months and a few days...just past the time where they give me phone support, lucky me. 
    WINNER...........TIGERBLOOD.

Maybe you are looking for

  • File to IDoc scenario in SRM

    Hello All, I am executing a scenario involving File to IDoc using an XSLT interface mapping. I am getting an error with error text "Tag ORDERHEADER found instead of tag IDOC BEGIN" Here is the error message: <?xml version="1.0" encoding="UTF-8" stand

  • Purchase requisitions with item category "consigment" in transaction MD04.

    Hi, I need to configure the system in order to create purchase requisitions where every item category should be "consignment" when executing transaction MD04. What should I do? Thanks in advance, Luis.

  • Cursor in JTextPane

    hai i have a JTextPane. A JButton is inserted in the JTextPane using insertComponent() method. i want the cursor to be changed to HAND_CURSOR when it is over the button. i added a mouselistener to the button. In the listener i implemented the method

  • Wonky

    Just got a Bionic, first smart phone. Steep learning curve. Thought computers were supposed to make life easier! Anyway, lots of questions. (There wil be more to come, so thanks in advance to anyone willing to respond.)  BTW The Verizon "manual" suck

  • WLC 2504 max AP support

    Hi all, Does anybody know what is the maximum number of APs supported on Cisco 2504 WLC? According to the Data Sheet it is 75: http://www.cisco.com/en/US/prod/collateral/wireless/ps6302/ps8322/ps11630/data_sheet_c78-645111.html But according to the c