How to find control,  jListBox with checkBoxs

Hello Everyone
Using Jclient/Swing application i want to use listbox with
checkBoxs.
Suppose listbox display list of items along with
these checkboxs.And these checkbox varies according the
items aviable in listbox.
whether this type control available in jDeveloper or not.

Thanks for reply !
i found swing code for jListBox containing checkboxs.
So how to use this class in Jdeveloper for using as
a control.
Please tell me suggetion?
public class CheckBoxList extends JFrame
     protected JList m_list;
     //protected JLabel m_total;
     public CheckBoxList()
          super("Swing List [Check boxes]");
          setSize(360, 340);
          getContentPane().setLayout(new FlowLayout());
          InstallData[] options = {
          new InstallData("Program executable", 118),
          new InstallData("Help files", 52),
          new InstallData("Tools and converters", 83),
          new InstallData("Source code", 133),
          new InstallData("Project",147),
new InstallData("Search",188),
new InstallData("Edit",189),
new InstallData("Girdher",3445)
          m_list = new JList(options);
          CheckListCellRenderer renderer = new CheckListCellRenderer();
          m_list.setCellRenderer(renderer);
          m_list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
          CheckListener lst = new CheckListener(this);
          m_list.addMouseListener(lst);
          m_list.addKeyListener(lst);
          JScrollPane ps = new JScrollPane();
          ps.getViewport().add(m_list);
//          m_total = new JLabel("Space required: 0K");
          JPanel p = new JPanel();
          p.setLayout(new BorderLayout());
          p.add(ps, BorderLayout.CENTER);
     //p.add(m_total, BorderLayout.SOUTH);
          p.setBorder(new TitledBorder(new EtchedBorder(),
               "Please select options:") );
          getContentPane().add(p);
          WindowListener wndCloser = new WindowAdapter()
               public void windowClosing(WindowEvent e)
                    System.exit(0);
          addWindowListener(wndCloser);
          setVisible(true);
     //     recalcTotal();
/*public void recalcTotal()
          ListModel model = m_list.getModel();
          int total = 0;
          for (int k=0; k < model.getSize(); k++)
               InstallData data = (InstallData)model.getElementAt(k);
               if (data.isSelected())
                    total += data.getSize();
          m_total.setText("Space required: "+total+"K");
     public static void main(String argv[])
          new CheckBoxList();
class CheckListCellRenderer extends JCheckBox implements ListCellRenderer
     protected static Border m_noFocusBorder =
          new EmptyBorder(1, 1, 1, 1);
     public CheckListCellRenderer()
     super();
     setOpaque(true);
     setBorder(m_noFocusBorder);
     public Component getListCellRendererComponent(JList list,
          Object value, int index, boolean isSelected, boolean cellHasFocus)
          setText(value.toString());
          setBackground(isSelected ? list.getSelectionBackground() :
          list.getBackground());
          setForeground(isSelected ? list.getSelectionForeground() :
          list.getForeground());
          InstallData data = (InstallData)value;
          setSelected(data.isSelected());
          setFont(list.getFont());
          setBorder((cellHasFocus) ?
               UIManager.getBorder("List.focusCellHighlightBorder")
               : m_noFocusBorder);
          return this;
class CheckListener implements MouseListener, KeyListener
     protected CheckBoxList m_parent;
     protected JList m_list;
     public CheckListener(CheckBoxList parent)
          m_parent = parent;
          m_list = parent.m_list;
     public void mouseClicked(MouseEvent e)
          if (e.getX() < 20)
               doCheck();
     public void mousePressed(MouseEvent e) {}
     public void mouseReleased(MouseEvent e) {}
     public void mouseEntered(MouseEvent e) {}
     public void mouseExited(MouseEvent e) {}
     public void keyPressed(KeyEvent e)
          if (e.getKeyChar() == ' ')
               doCheck();
     public void keyTyped(KeyEvent e) {}
     public void keyReleased(KeyEvent e) {}
     protected void doCheck()
          int index = m_list.getSelectedIndex();
          if (index < 0)
               return;
          InstallData data = (InstallData)m_list.getModel().
               getElementAt(index);
               data.invertSelected();
               m_list.repaint();
          //     m_parent.recalcTotal();
class InstallData
protected String m_name;
protected int m_size;
protected boolean m_selected;
public InstallData(String name, int size)
     m_name = name;
     m_size = size;
     m_selected = false;
public String getName() { return m_name; }
public int getSize() { return m_size; }
public void setSelected(boolean selected) { m_selected = selected;}
public void invertSelected() { m_selected = !m_selected; }
public boolean isSelected() { return m_selected; }
public String toString() { return m_name+" ("+m_size+" K)"; }

Similar Messages

  • How to find report created with Report Painter?

    Hi!
    how to find report created with Report Painter?
    Here is the information that I have:
    Object filename, let's say <b>Y_P01_90000001</b>
    Report painter object <b>INV-102</b>
    The thing is that Library is unknown, thats why I can not find it via GR22...
    Any ideas?
    Will reward,
    Mindaugas

    Check in GRR3 under <b>INV</b> node...

  • How to find material recieved with excise duty or without excise duty

    HI
    how to find material recieved with or without excise duty , and which table  these data store . Because we need to develope one new report.
    Regards
    Ganesh

    HI,
    Check the report J1I5 , For the Material received with the Excise Details,
    Table "J_1IEXCHDR" will store the Excise invoice header data.
    Regards
    Mascot.

  • How to find sql statement with Unix process pid

    Hi
    how to find sql statement with Unix process pid
    is there any view to find that.
    please if so let me know
    Thanks in advance

    this is how I am doing this:
    oracle 7352340 7459066 0 07:47:10 - 0:00 oracleJDERED (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
    oracle 7459066 5386396 2 07:47:10 pts/1 0:01 sqlplus
    select sid,serial# from v$session where process='7459066';
    SID SERIAL#
    2178 6067
    select sql_text
    from
    v$sqlarea a,
    v$session b
    where a.hash_value = b.sql_hash_value
    and b.sid = 2178
    ;

  • How to find index name with primarykey and column on a table?

    Hi,
    how to find index name with primarykey and column on a table?
    please help me.
    Thankyou.

      1  select ac.table_name, ac.index_name, aic.column_name
      2  from user_constraints ac, user_ind_columns aic
      3  where ac.constraint_type = 'P'
      4   and  ac.index_name = aic.index_name
      5* order by 1,2,3
    SQL> /
    TABLE_NAME                 INDEX_NAME                COLUMN_NAME
    ACTION_TABLE                 SYS_C0011033                NESTED_TABLE_ID
    ACTION_TABLE                 SYS_C0011033                SYS_NC_ARRAY_INDEX$
    CATEGORIES_TAB                 SYS_C0011038                CATEGORY_ID
    CUSTOMERS                 CUSTOMERS_PK                CUSTOMER_ID
    INVENTORIES                 INVENTORY_IX                PRODUCT_ID
    INVENTORIES                 INVENTORY_IX                WAREHOUSE_ID
    LINEITEM_TABLE                 SYS_C0011034                NESTED_TABLE_ID
    LINEITEM_TABLE                 SYS_C0011034                SYS_NC_ARRAY_INDEX$
    ORDERS                      ORDER_PK                 ORDER_ID
    ORDER_ITEMS                 ORDER_ITEMS_PK                LINE_ITEM_ID
    ORDER_ITEMS                 ORDER_ITEMS_PK                ORDER_ID
    PRODUCT_DESCRIPTIONS            PRD_DESC_PK                LANGUAGE_ID
    PRODUCT_DESCRIPTIONS            PRD_DESC_PK                PRODUCT_ID
    PRODUCT_INFORMATION            PRODUCT_INFORMATION_PK           PRODUCT_ID
    PROMOTIONS                 PROMO_ID_PK                PROMO_ID
    WAREHOUSES                 WAREHOUSES_PK                WAREHOUSE_ID
    16 rows selected.

  • How to find by email with JPA?

    How to find by email with JPA? My this but not worked
    public WnUser findUser(WnUser email) {
    return (WnUser) em.createQuery
    ("SELECT object(u.email) FROM entities.WnUser u WHERE u.email =:email").setParameter("email", email.getEmail()).getSingleResult();
    javax.ejb.EJBException: javax.persistence.NoResultException: No entity found for query
    12:23:44,843 ERROR [STDERR]      at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:63)
    12:23:44,843 ERROR [STDERR]      at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83)
    12:23:44,843 ERROR [STDERR]      at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
    12:23:44,843 ERROR [STDERR]      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)

    First off, you are not really doing:
    GWAccount->GWAddressBook->GWAddressBookEntrie->
    get_EmailAddress,get_DisplayName()
    are you?
    If you enter the full line, it will read in all
    of the entries each time it is called.
    You should break each part into an object:
    gwAccount
    gwBook
    gwEntries
    I'm not sure what you are doing.
    Are you trying to compose an email?
    If so, why are you not using Recipients.Resolve()?
    Are you trying to get the recipients from an email?
    Preston
    >>> On Friday, April 16, 2010 at 1:26 AM,
    hillp<[email protected]>
    wrote:
    > as title,
    > i can get the display name from the to, cc, bc edit box,
    > then i need to get the email address,
    > current i use object API to query:
    >
    GWAccount‑>GWAddressBook‑>GWAddressBookEntrie >get_EmailAddress,get_Di
    splayName
    > but i find it is really slow when there are many contacts, example
    > 10000.
    >
    > so is there any other effective method to get the email address?

  • How to find a routine with it's technical name

    Hello!
    I am wondering how to find a routine with it's technical name (e.g. "ROUT 7QAXE7SDXIVW4BJ2S2UL3HLAS" as shown in the error message in a transport log).
    So I would like to find out, where this routine is located (w.g. which characteristic/key figure in which transfer/update rule).
    Any ideas welcome. Thanks, Thomas

    Hi Thomas,
    You can try the following:
    Look up table <b>RSUPDROUT</b>with the GUID of your routine (like 7QAXE7SDXIVW4BJ2S2UL3HLAS)in the ABAP Code ID field selection. This will show you the InfoObject it is created on, and the GUID of the update rules. If you click on the Check Table button, you can find out the data target and InfoSource of the Update Rule.
    In table <b>RSAROUTT</b>you can again use the GUID of your routine to check the description assigned to the routine during its creation.
    I am not sure if this works for the routines of transfer rules....still checking it and will update if anything turns up.
    Hope this helps...

  • HT1529 how to find my iphone with the serial number

    hi
    could you please tell how to find my iphone with the serial number ?

    Sorry, there is no way to do that.
    What To Do If Your iDevice or Computer Is Lost Or Stolen
    iPhone, iPod Touch, and iPad
    If you activated Find My Phone before it was lost or stolen, you can track it only if Wi-Fi is enabled on the device. What you cannot do is track your device using a serial number or other identifying number. You cannot expect Apple or anyone else to find your device for you. You cannot recover your loss unless you insure your device for such loss. It is not covered by your warranty.
    If your iPhone, iPod, iPod Touch, or iPad is lost or stolen what do you do? There are things you should have done in advance - before you lost it or it was stolen - and some things to do after the fact. Here are some suggestions:
    This link, Re: Help! I misplaced / lost my iPhone 5 today morning in delta Chelsea hotel downtown an I am not able to track it. Please help!, has some good advice regarding your options when your iDevice is lost or stolen.
      1. Reporting a lost or stolen Apple product
      2. Find my lost iPod Touch
      3. AT&T. Sprint, and Verizon can block stolen phones/tablets
      4. What-To-Do-When-Iphone-Is-Stolen
      5. What to do if your iOS device is lost or stolen
      6. 6 Ways to Track and Recover Your Lost/Stolen iPhone
      7. Find My iPhone
      8. Report Stolen iPad | Stolen Lost Found Online
    It pays to be proactive by following the advice on using Find My Phone before you lose your device:
      1. Find My iPhone
      2. Setup your iDevice on iCloud
      3. OS X Lion/Mountain Lion- About Find My Mac
      4. How To Set Up Free Find Your iPhone (Even on Unsupported Devices)
    Mac Computer
           Find My Mac can be used from Find My Phone at iCloud.com and via Find
           My Phone on your iDevice.
          The following is third-party anti-theft software:
               1.  STEM 2.1
               2.  MacPhoneHome 3.5
               3.  MacTrack 7.5.0
               4.  VUWER 1.7
               5.  Sneaky Bastar* 0.2.0
               6.  Undercover 5.1.1
               7.  LoJack for Laptops
               8. Hidden 2.0

  • How to find IDOC no with reference to one billing document no

    Dear all,
    Can you please tell :
    How to find IDOC no with reference to one billing document no
    Thanks

    Hi Pavan,
    You are absolutely correct.  But what i need to know is sometime , even in the sales order there will be no output type (basically inbound) which can be found as suggested by Sunil - I think that is the most relevant way to find the IDOC no. Hope you will agree with me. Again how to activate by IAN is also guides the idea. Only thing we need to know the exact parameter to be maintained in own data.
    Thanks for your one of the valid suggestion.
    Regards,
    Ranjan

  • How to Find PS GUID with WBS Element (POSID) or Project Definition (PSPID)?

    Hi all,
        I am creating the custom Extractor similar to 0CO_OM_WBS_1 (WBS elements: Costs) to load into 0PS_C041 (Project System - Controlling (New)). I have the WBS Element (POSID) & Project Definition (PSPID) and I how can I find the GUID (UUID in X form Binary) so that I could map it into 0PSGUID InfoObject in the Transformation. We have WBS Element & Project Definition (PSPID) as Navigation Attributes of 0PSGUID instead of under some Dimension in 0PS_C041 Cube and that's why I am trying to find the GUID with WBS Element (POSID) or Project Definition (PSPID), PLEASE.
    Thanks,
    Venkat.

    Hi Bala
    Yes, you have put it rather correctly.
    We use WBS elements for booking and posting time (client requirement). So what I am looking for is WBS Elements with the system status TERL (Time and Expense Released).
    I talked of the deletion flag also, because a WBS element flagged for deletion can't be used. It's one of the criteria to screen the WBS elements.
    I hope it's clearer now.
    Vinitha.

  • How to create a JTable with CheckBox(checkbox should be added to a buttong)

    hi,
    i want a JTable with checkbox or radio button with them as editable.Only one check box can be selected i.e i want to add it to button group.no of rows in the table to not fixed
    And on the click of radiobutton a text field has to be updated.
    how to do this???
    thanks
    neel

    I think this article would be helpful:
    http://www.chka.de/swing/table/columns.html
    But don't expect any thanks from the OP!Exuse me my dummy question. But I am novice at this
    forum. Who is OP and what do you mean?OP - Original Poster.
    Thanks - a response indicating that your efforts in providing a solution to a problem are appreciated!

  • How to find jars compatibility with JDK 6

    Hi All,
    Could you please let me if there is any way to find out if a given jar version will be compatible with the JDK version 1.6 (i.e. java 6)?
    Let’s say I have Junit version 3.8.1 currently and it is working fine with current JDK version 1.4.2_11. I want to upgrade JDK version to 1.6 (java 6), then how to find out current JUnit version will be compatible with JDK 6? If not how to find out which version of Junit will be compatible with JDK6?
    Please let me know if you need more info.
    Regards,
    psg

    spring_1_2_5.jarI assume you are using spring framework 1.2.5.
    In this case, you should look at this framework documentation/change log to see what the requirements are.
    I think you could download spring framework 1.2.5 bundle (with dependencies). You can then look at the META-INF/MANIFEST.MF of every of jar
    (especially third party libraries) in order to know its version.
    Every framework release must have been tested and compatibilities resolved, so the job of finding what jar goes with this release is already done.
    Example (spring 1.2.x):
    fixed JdkVersion to properly detect JDK 1.6/1.7 (Java 6/7) as higher than 1.5 (Java 5)See [change log|http://static.springsource.org/spring/docs/1.2.x/changelog.txt] here
    Hope it helps

  • How to submit a form with checkboxes in a page flow?

    I'm having some trouble with a form that contains several checkboxes, and
    how to submit this form within a page flow...
    I have a JSP page containing a form with N checkboxes. The value and
    checked/unchecked status of each checkbox is generated from parsing an XML
    document. Here is the (simplified) code:
    <%@ taglib uri="http://java.sun.com/jstl/xml" prefix="x" %>
    <netui:form action="doUpdate">
    <x:forEach select="...">
    <input type="checkbox" name="id"
    <x:if ...>checked</x:if> value="<x:out ... />">
    </x:forEach>
    <netui:anchor formSubmit="true" action="doUpdate">Submit</netui:anchor>
    <netui:anchor action="doCancel">Cancel</netui:anchor>
    </netui:form>
    When this form is submitted, the checkbox values are lost -- the following
    code (in the action) produces an empty array:
    String[] prefs = this.getRequest().getParameterValues("id");
    I looked at the <netui:checkbox> tag, but it does not appear to give me a
    way to set the state and value (unless I've missed something).
    Can I submit a form without using a form bean? If I do use a form bean, can
    I set the state and value from my JSP?
    Any suggestions on how to do this (or insights into what I'm doing wrong)
    are welcome...
    -- Craig

    I am new to this, but I think this may solve your problem:
    I am not sure if this is what you are looking for, but you can create a LinkedHashMap
    with the req key/value pairs in the page-calling action in the pageflow and then
    pass that via a getRequest().setAttribute("myCheckboxes",myCheckboxHashMap);
    You can then access it in code using the optionsDataSource portion of the netui:checkBoxGroup
    - ie
    <netui:checkBoxGroup dataSource="{actionForm.thisCheckbox}" optionsDataSource="{request.myCheckboxes}">
    Hope this helps!
    m
    "Craig Coffin" <craig+1268fbec@nfld-dot-com> wrote:
    I'm having some trouble with a form that contains several checkboxes,
    and
    how to submit this form within a page flow...
    I have a JSP page containing a form with N checkboxes. The value and
    checked/unchecked status of each checkbox is generated from parsing an
    XML
    document. Here is the (simplified) code:
    <%@ taglib uri="http://java.sun.com/jstl/xml" prefix="x" %>
    <netui:form action="doUpdate">
    <x:forEach select="...">
    <input type="checkbox" name="id"
    <x:if ...>checked</x:if> value="<x:out ... />">
    </x:forEach>
    <netui:anchor formSubmit="true" action="doUpdate">Submit</netui:anchor>
    <netui:anchor action="doCancel">Cancel</netui:anchor>
    </netui:form>
    When this form is submitted, the checkbox values are lost -- the following
    code (in the action) produces an empty array:
    String[] prefs = this.getRequest().getParameterValues("id");
    I looked at the <netui:checkbox> tag, but it does not appear to give
    me a
    way to set the state and value (unless I've missed something).
    Can I submit a form without using a form bean? If I do use a form bean,
    can
    I set the state and value from my JSP?
    Any suggestions on how to do this (or insights into what I'm doing wrong)
    are welcome...
    -- Craig

  • Online college, open document, how to find URL associated with document

    I am currently enrolled in an online college.  For APA formatting, we are supposed to find the URL associated with an online document.  For example:  on the college website I click on a link that takes me to the open/save box.  I open the file, at the top of the page is the name: sn_2010_writing_scholarly_voice-1.  On a PC we are supposed to cut/paste that into our web browser to come up with the URL.  I'm not seeing how to do this on a MAC. 

    Here's a code snipet with null checks removed:
    UID MyClassName::GetFrameForXMLElement(IIDXMLElement* inXMLElement)
        InterfacePtr< ITextModel > textModel( Utils< IXMLUtils >()->QueryTextModel( inXMLElement ) );
        InterfacePtr< IFrameList > frameList( textModel->QueryFrameList() );
        UID aFrameUID = frameList->GetNthFrameUID( 0 );
        return aFrameUID;

  • How to find a word with different font format (e.g. italic and regular in one word)

    Hi people,
    I need to find a word, prefferably using GREP or simple Find/Replace tool.
    Sometimes, when I get source text to paste into InDesign, some word's format is messed up. First letter is italic and rest is regular or otherwise (or any other font format). How can I find such words automatically. For example:
    Example
    would really appreciate any help.
    best regards
    JMG.

    Hi,
    If I had to do that, using Multi-Find/Change, I would play it like:
    With MFC, I create a set of the 2 regex. So, one click to fix your problem.

Maybe you are looking for

  • Does labview have drag and drop capability while a program is running

    Suppose I have a cluster with controls of various datatypes on the front panel of one vi. Is it possible to represent that cluster with an icon, and then drag that icon on to the front panel of a second vi? The information in the cluster would then b

  • How to replace background music but retain sound effects

    I am trying to add/replace the background music of a series of clips that all have sound effects.  I noticed that many of the sound effects carry over into the other channels.  I am using the 5.1 preset currently.  Ideally I would like to add a song

  • How to unassign master page

    Hello everyone. How are you? I'd like to assig none master spread to the page. But, I didn't kow how to unassign it. I find the clue in the API manual. keyword is kApplyMasterSpreadCmdBoss, IID_IAPPLYMASTERCMDDATA virtual void Set UIDRef UIDRef UIDRe

  • Date format in iStudio

    How can I change the date format in iStudio ? Actually, the date format looks like "juin 10, 2004".

  • Dreamweaver freezes on design view

    I am having issues with dreamweaver freezing in design view.  when i click on design view, it crashes, and i have to restart.  i have tried multiple installs, as well as uncheck "display external files".  what else could be the issue?  is there a new