How can I make a check box active ONLY if another check box is activated?

How can I make a check box active ONLY if another check box is activated?
I have an editable PDF for a client, which contains text fields and check box fields.
There are three main check boxes (let's call them A, B and C) that the user is required to choose from, and I have given all three the same name in the Name tab of the General tab menu but different export values in order that ONLY one of the boxes can be checked at any time. Ticking one will deactivate another if it is already checked, etc.
However, I then have a further two check boxes which I wish to become available ONLY if the second one of the above three boxes is checked. Other than that I do not wish the user to have access to them.
I'm guessing it requires some kind of Action Script or Javascript, which is not my forté! Any help would be much appreciated.
Regards
Tony

See Disabling (graying-out) Form Fields by Thom Parker. It covers both Acrobat and LiveCycle forms.

Similar Messages

  • How can I make the Label go on top of the Text box?

    How can I make the Label go on top of the Text box?
    Thanks again,
    Doug

    Set the Label Horizontal / Vertical Alignment property for the textarea to Above.

  • How can I make my query to compare only columns of two tables... not the storage information?

    11GR2
    =-----------------------------------
    I am using below querry to compare two table that has same name, under two different users... But after making storage information false like below and  if the storage information is different on column level than it create "Alter modify " statements for the column ... How can I make my query to compare only columns of two tables... not the storage information?
    begin
    DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM,'PRETTY', TRUE);
    DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM,'SQLTERMINATOR',TRUE);
    DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM,'SEGMENT_ATTRIBUTES', FALSE);
    DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM,'STORAGE', FALSE);
    DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM,'TABLESPACE',FALSE);
    DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM,'CONSTRAINTS',FALSE);
    DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM,'REF_CONSTRAINTS',FALSE);
    DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM,'CONSTRAINTS_AS_ALTER',FALSE);
    End;
    select REGEXP_REPLACE(dbms_metadata_diff.compare_alter('TABLE','TABLE_NAME_A','TABLE_NAME_A','USER1','USER2'),('USER1...'),'', 1, 0, 'i') from dual

    I am using below querry to compare two table that has same name, under two different users... But after making storage information false like below and  if the storage information is different on column level than it create "Alter modify " statements for the column ... How can I make my query to compare only columns of two tables... not the storage information?
    If you want help you have to SHOW us what you are doing and how you are doing it; you can't just try to tell us in your own words.
    We can't see your computer screen.

  • How can I make a file not read only? Using LV6.0, I have tried the Access Rights VI w/o luck.

    I am talking about any file in windows 98 that has the read only box checked when I look at the properties of the file from Windows Explorer. I can can get rid of the check from the properties box, but I want to do it programmaticaly in LabView.

    Hi,
    Wire in '448' to the 'New Permissions' of the Access Rights VI. This will set the file as readable, writable and executable. I just tried this (on WinNT, though).
    The 'permissions' parameter is a 16-bit integer where the least 9 bits are used. Of these, for Windows, bits 8, 9, and 10 (0-indexed) are important (i.e. if these are set = integer 448). See online Help for full details.
    Hope this helps,
    Khalid

  • How can I make I-cloud back up only the files created since the last Time-Machine backup?

    Hi everyone,
    So, I wish to use time-machine to back up every six weeks or so. This means a whole range of files could be lost if my wonderfully fast but terrifyingly unrecoverable solid state hard drive packs up.
    Has anyone any idea how I can make Icloud only backup files created since the last time machine backup?
    Best
    Danny

    Automator is not the right solution.
    Use a folder action script. Apple has an example here: (Auto-backup Script):
    http://www.apple.com/applescript/folderactions/05.html
    the steps might have been written for 10.3, so the steps may not be 100% right, but this will do what you want.

  • How can I make button changing from one pic to another pic?

    Hi,
    I want to make an image as button which should show on mouse over anoher image? How it is possible?
    Please help.
    Regards.

    either right click the keyframe and go to convert to blank keyframe, or
    delete the keyframe and add a blank keyframe instead, or just erase
    everything in the keyframe.  Whenever you make a new keyframe, it will bring
    over whatever is present in the previous keyframe unless you have flash
    create a blank keyframe.

  • How can I make a 3D cube using only Flash CS4?

    Looking for a tutorial on how to make a 3d cube. The best one I found was how to make a book, which is three sides short of a cube. If worse comes to worse I think there's a way to take two identical movie clips with three sides each and pivot them around the same point to form a cube. But if there's some solid instruction anyone could provide or a link, it would save me countless hours of guessing testing and revising.
    Thanks!

    Hi,
    Wire in '448' to the 'New Permissions' of the Access Rights VI. This will set the file as readable, writable and executable. I just tried this (on WinNT, though).
    The 'permissions' parameter is a 16-bit integer where the least 9 bits are used. Of these, for Windows, bits 8, 9, and 10 (0-indexed) are important (i.e. if these are set = integer 448). See online Help for full details.
    Hope this helps,
    Khalid

  • How can we make the Retake Quiz button only appear when user reenters the course?

    In a Captivate 8 Quiz, we need to force the user to close the course (so attempts are captured by the LMS) from the Quiz Results page. The Retake Quiz button cannot show at this time. However, when the learner reenters the course from the LMS, the bookmarking brings the user to the Results page again. We need a Retake Quiz button to only show when the user reenters the course, not on Quiz completion. Disabling the bookmarking disables the reporting of attempts. Does anyone know a way to make that happen or a workaround?

    Have a look at my blog post:
    http://blog.lilybiri.com/review-only-incorrect-slides-captivate-6
    Lilybiri

  • How can we make lov as default value based on another lov values

    Hi Experts,
    Example
    we r having 2 lovs asume that lov1 and lov2 based on lovv1 i want to make lov2 as a default .
    We have done the steps as mentioned in this forum. actually its returning null value.
    appreciate your help on this. Pls find the below code.
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    OAApplicationModule am= pageContext.getApplicationModule(webBean);
    if(pageContext.isLovEvent())
    if("lovValidate".equals(pageContext.getParameter(OAWebBeanConstants.EVENT_PARAM)) && "lovUpdate".equals(pageContext.getParameter(OAWebBeanConstants.EVENT_PARAM))||"lovPrepare".equals(pageContext.getParameter(OAWebBeanConstants.EVENT_PARAM)))
    String lovInputSourceId = (String)pageContext.getLovInputSourceId();
    if("lov1id".equals(lovInputSourceId))
    OAMessageLovInputBean lovBean=(OAMessageLovInputBean)webBean.findIndexedChildRecursive("WorkOrder");
    String lovInput = (String) lovBean.getValue(pageContext);
    OAViewObject vo = (OAViewObject)am.findViewObject("ChargeTimeWorkOrdersLovVO");
    if(vo != null)
    OARow row = (OARow)vo.getCurrentRow();
    if(row!= null)
    OAMessageLovInputBean lovBean1=(OAMessageLovInputBean)webBean.findIndexedChildRecursive("lov21d");
    String value=pageContext.getParameter("lov2id");
    if(lovBean1!=null)
    lovBean.setText("10"); }
    Regards,
    Srinivas

    Hi Gyan,
    We are gettign Null Pointer exception.
    This is the code after modification for the current row:
    OAApplicationModule am= pageContext.getApplicationModule(webBean);
    if (pageContext.isLovEvent()) { String lovInputSourceId = pageContext.getLovInputSourceId(); 
    if("WorkOrder".equalsIgnoreCase(lovInputSourceId))
    OAViewObject vo = (OAViewObject)am.findViewObject("ChargeTimeWorkOrdersLovVO");
    vo.getCurrentRow();
    {  OAMessageLovInputBean compBean=(OAMessageLovInputBean)webBean.findIndexedChildRecursive("OpSeqNum");  
    if(compBean!=null)
    {   compBean.setValue(pageContext,"10");          } } }
    This is the error stack:
    Error Page
    Exception Details.
    oracle.apps.fnd.framework.OAException: java.lang.NullPointerException
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:896)
         at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1169)
         at oracle.apps.fnd.framework.webui.OAPageErrorHandler.processErrors(OAPageErrorHandler.java:1435)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2867)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1840)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:538)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:426)
         at OA.jspService(_OA.java:204)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at oracle.apps.jtf.base.session.ReleaseResFilter.doFilter(ReleaseResFilter.java:26)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
         at oracle.apps.fnd.security.AppsServletFilter.doFilter(AppsServletFilter.java:318)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:889)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:313)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:199)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:619)
    ## Detail 0 ##
    java.lang.NullPointerException
         at xbol.oracle.apps.eam.workplan.webui.XXChargeTimeCO.processFormRequest(XXChargeTimeCO.java:97)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:815)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:382)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1189)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1027)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:993)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:848)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:382)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1027)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:993)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:848)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:382)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2863)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1840)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:538)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:426)
         at OA.jspService(_OA.java:204)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at oracle.apps.jtf.base.session.ReleaseResFilter.doFilter(ReleaseResFilter.java:26)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
         at oracle.apps.fnd.security.AppsServletFilter.doFilter(AppsServletFilter.java:318)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:889)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:313)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:199)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:619)
    java.lang.NullPointerException
         at xbol.oracle.apps.eam.workplan.webui.XXChargeTimeCO.processFormRequest(XXChargeTimeCO.java:97)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:815)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:382)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1189)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1027)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:993)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:848)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:382)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1027)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:993)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:848)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:382)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2863)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1840)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:538)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:426)
         at OA.jspService(_OA.java:204)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at oracle.apps.jtf.base.session.ReleaseResFilter.doFilter(ReleaseResFilter.java:26)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
         at oracle.apps.fnd.security.AppsServletFilter.doFilter(AppsServletFilter.java:318)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:889)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:313)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:199)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:619)
    Regards,
    Srinivas
    Edited by: 878523 on Aug 11, 2011 4:03 AM

  • How can I make my movies to play one after another automatically?

    I couldn't find the settings to play all my movies one after another.
    Any idea?

    Given the number of threads bemoaning the lack of such features (mostly for music videos) and countless enhancement requests sent here:
    http://www.apple.com/feedback/appletv.html
    ..and the lack of the facility being added in over a year make me think it's unlikely to ever happen but I'd love ot be proved wrong!
    AC

  • How can I make it so a proxy only works on a 10.0.0.0/24 subnet? I want all other traffic to go through my regular internet connection.

    same as question

    Hi traviszech,
    Thank you for your question. There were alot of questions about proxies over the weekend...
    Ok so there are some ways to administer a custom proxy which would specify ip addresses, however since this is all from one computer I will try to point you in the right directions.
    Try a Pac file
    [http://www.proxypacfiles.com/proxypac/?option=com_content&view=article&id=54&Itemid=83]
    I hope this helps.

  • I have OS 10.4.11 and iTunes 9.2.1 (5). My iPhone 4s does not appear in iTunes. only iPhoto recognize my iPhone. Update of iTunes seems not possible. How can I make appear my iPhone in iTunes?

    I have OS 10.4.11 and iTunes 9.2.1 (5). My iPhone 4s does not appear in iTunes. only iPhoto recognize my iPhone. Update of iTunes seems not possible. How can I make appear my iPhone in iTunes?

    From the box the iphone came in:
    Syncing with iTunes on a Mac or PC requires:
    Mac: OS X v10.5.8 or later
    PC: Windows 7; Windows Vista; or Windows XP Home or Professional with Service Pack 3 or later
    iTunes 10.5 or later (free download fromwww.itunes.com/download)"
    You will need Mac OS 10.5.8 or later in order to get itunes 10.5 or later, in order to connect your iphone.

  • How can I make sure linked in contacts are only added once?

    For some reason the linkedin contacts are appearing endlessly in my mac address book. Every time I delete they come back - Very annoying especially since I have to delete folders manually one by one. How can I make sure linked in contacts only added once? And how can I delete from mac address book  in one go?

    If you installed software from LinkedIn to synchronize the contacts, refer to the developer for support. Otherwise, how did you import the contacts?

  • After 15 mins  with no activity my airport express turns off how can I make it permanent

    After about 15 mins with no activity my airport express turns off. How can I make it stay on permanently ?

    Not sure what you mean by "turns off".  Are you saying that the light on the Express goes out after 15 minutes?
    Assuming that it is functioning correctly, the AirPort Express is "always on". It has no type of "sleep" setting.
    If the power light on the Express remains on, you have some other device on the network that is going into a standby mode or sleep mode. Check the Preference settings on other devices on the network.

  • How can I make the combo box turn to the value of black.

    When the show button is pressed (and not before), a filled black square should be
    displayed in the display area. The combo box (or drop down list) that enables the user to choose the colour of
    the displayed shape and the altering should take effect immediately.When the show button is pressed,
    the image should immediately revert to the black square, the combo box should show the value that
    correspond to the black.
    Now ,the problem is: after I pressed show button, the image is reverted to the black square,but I don't know
    how can I make the combo box turn to the value of black.
    Any help or hint?Thanks a lot!
    coding 1.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class test extends JFrame {
         private JPanel buttonPanel;
         private DrawPanel myPanel;
         private JButton showButton;
         private JComboBox colorComboBox;
    private boolean isShow;
         private int shape;
         private boolean isFill=true;
    private String colorNames[] = {"black", "blue", "cyan", "darkGray", "gray",
    "green", "lightgray", "magenta", "orange",
    "pink", "red", "white", "yellow"}; // color names list in ComboBox
    private Color colors[] = {Color.black, Color.blue, Color.cyan, Color.darkGray,
                              Color.gray, Color.green, Color.lightGray, Color.magenta,
                              Color.orange, Color.pink, Color.red, Color.white, Color.yellow};
         public test() {
         super("Draw Shapes");
         // creat custom drawing panel
    myPanel = new DrawPanel(); // instantiate a DrawPanel object
    myPanel.setBackground(Color.white);
         // set up showButton
    // register an event handler for showButton's ActionEvent
    showButton = new JButton ("show");
         showButton.addActionListener(
              // anonymous inner class to handle showButton events
         new ActionListener() {
                   // draw a black filled square shape after clicking showButton
         public void actionPerformed (ActionEvent event) {
                             // call DrawPanel method setShowStatus and pass an parameter
              // to decide if show the shape
         myPanel.setShowStatus(true);
                   isShow = myPanel.getShowStatus();
                                            shape = DrawPanel.SQUARE;
                        // call DrawPanel method setShape to indicate shape to draw
                                            myPanel.setShape(shape);
                        // call DrawPanel method setFill to indicate to draw a filled shape
                                            myPanel.setFill(true);
                        // call DrawPanel method draw
                                            myPanel.draw();
                             myPanel.setFill(true);
                             myPanel.setForeground(Color.black);
                   }// end anonymous inner class
         );// end call to addActionListener
    // set up colorComboBox
    // register event handlers for colorComboBox's ItemEvent
    colorComboBox = new JComboBox(colorNames);
    colorComboBox.setMaximumRowCount(5);
    colorComboBox.addItemListener(
         // anonymous inner class to handle colorComboBox events
         new ItemListener() {
         // select shape's color
         public void itemStateChanged(ItemEvent event) {
         if(event.getStateChange() == ItemEvent.SELECTED)
         // call DrawPanel method setForeground
         // and pass an element value of colors array
         myPanel.setForeground(colors[colorComboBox.getSelectedIndex()]);
    myPanel.draw();
    }// end anonymous inner class
    ); // end call to addItemListener
    // set up panel containing buttons
         buttonPanel = new JPanel();
    buttonPanel.setLayout(new GridLayout(4, 1, 0, 50));
         buttonPanel.add(showButton);
    buttonPanel.add(colorComboBox);
    JPanel radioButtonPanel = new JPanel();
    radioButtonPanel.setLayout(new GridLayout(2, 1, 0, 20));
    Container container = getContentPane();
    container.setLayout(new BorderLayout(10,10));
    container.add(myPanel, BorderLayout.CENTER);
         container.add(buttonPanel, BorderLayout.EAST);
    setSize(500, 400);
         setVisible(true);
         public static void main(String args[]) {
         test application = new test();
         application.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    coding 2
    import java.awt.*;
    import javax.swing.*;
    public class DrawPanel extends JPanel {
         public final static int CIRCLE = 1, SQUARE = 2;
         private int shape;
         private boolean fill;
         private boolean showStatus;
    private int shapeSize = 100;
    private Color foreground;
         // draw a specified shape
    public void paintComponent (Graphics g){
              super.paintComponent(g);
              // find center
    int x=(getSize().width-shapeSize)/2;
              int y=(getSize().height-shapeSize)/2;
              if (shape == CIRCLE) {
         if (fill == true){
         g.setColor(foreground);
              g.fillOval(x, y, shapeSize, shapeSize);
    else{
                   g.setColor(foreground);
    g.drawOval(x, y, shapeSize, shapeSize);
              else if (shape == SQUARE){
         if (fill == true){
         g.setColor(foreground);
                        g.fillRect(x, y, shapeSize, shapeSize);
    else{
                        g.setColor(foreground);
    g.drawRect(x, y, shapeSize, shapeSize);
    // set showStatus value
    public void setShowStatus (boolean s) {
              showStatus = s;
         // return showstatus value
    public boolean getShowStatus () {
              return showStatus;
         // set fill value
    public void setFill(boolean isFill) {
              fill = isFill;
         // set shape value
    public void setShape(int shapeToDraw) {
              shape = shapeToDraw;
    // set shapeSize value
    public void setShapeSize(int newShapeSize) {
              shapeSize = newShapeSize;
    // set foreground value
    public void setForeground(Color newColor) {
              foreground = newColor;
         // repaint DrawPanel
    public void draw (){
              if(showStatus == true)
              repaint();

    Hello,
    does setSelectedIndex(int anIndex)
    do what you need?
    See Java Doc for JComboBox.

Maybe you are looking for

  • C3-01, for next S/W update

    Enjoying Nokia C3-01 for nearly 2 months-impressive machine,but I have some suggestions for the next firmware I have aranged them by majority as I take it.I think Nokia are the simpliest phones,but sometimes simplicity is not the best,is it? First of

  • I plugged my iPod into a friends computer and my libary has been deleted!

    Is there any way of recovering what i have lost my inadvertantly syncing with his ipod? cheers michael

  • Protecting my file in windows server

    Hello, I wanted to protect file/folder in my document (user) in server 2008 R2 to be viewed by me only or password protected for unauthorized access. I want to set No permission to Administrator to view file/folder in my document. Regards, nts007

  • Solaris 10 scales to....

    A single instance of the Sparc Solaris 10 OS scales to.... How many processors? How much memory? A single instance of the x86 Solaris 10 OS scales to... How many processors? How much memory? I've been searching all over, and unable to find these uppe

  • Bluetooth and RMS

    Hello all. I would like to ask a question for a Bluetooth based program example in the WTK "BluetoothDemo" application. The Host is sharing his images via Bluetooth. Image are read through the local files an InputStream. Is the client possible to sto