How to add Checkbox in Table

Hi,
I want to add CheckBox in Table. my requirement is multiselection. I Implemented the following steps, but it's not working. anyone can tell me,what mistake i did?
I created two "Value Attribute"(check,Name) under a "Value Node"(Student) in context.
check - Boolean
Name - mapped a Dictionary simple Type(5 values)
Include a Table in Layout and select Create Binding on right clicking of Table.
Checked only Student and check -> Next
Selected the Editor as checkbox -> Finish
Selected Name from context and assigned to checkbox text property.
Then I deployed the application. But only one checkbox is displayed in Table without any text.
Please give me the suggestion, how to do this.
Thanks in Advance
Rajakumar

Hello,
I think you have a fundamental misunderstanding on how Checkboxes work. A Checkbox triggers a boolean value with true (checked) or false (uncheked).
When you map your name attribut to text you will see the content of that attribute as text behind. But not the metadata.
You may want to use a RadiobuttonGroup or CheckboxGroup for your purpose.
Frank

Similar Messages

  • How to Add Checkbox and icon in ALVGRID

    Hi Experts,
      i have one Requirement. i need to add Checkbox, Selectall,icon(Unlock or inactive) infront of Contracts of ALV GRID.How to achive that.
    Thanks,
    Venkat.

    Hi
    For check box
    At declaring field catalog using structure LVC_S_FCAT
    mark CHECKBOX = 'X' and also EDIT = 'X'.
    For reference check below subroutine in program BCALV_EDIT_05.
    form build_fieldcat changing pt_fieldcat type lvc_t_fcat.
    data ls_fcat type lvc_s_fcat.
    call function 'LVC_FIELDCATALOG_MERGE'
    exporting
    i_structure_name = 'SFLIGHT'
    changing
    ct_fieldcat = pt_fieldcat.
    *§A2.Add an entry for the checkbox in the fieldcatalog
    clear ls_fcat.
    ls_fcat-fieldname = 'CHECKBOX'.
    * Essential: declare field as checkbox and
    * mark it as editable field:
    ls_fcat-checkbox = 'X'.
    ls_fcat-edit = 'X'.
    * do not forget to provide texts for this extra field
    ls_fcat-coltext = text-f01.
    ls_fcat-tooltip = text-f02.
    ls_fcat-seltext = text-f03.
    * optional: set column width
    ls_fcat-outputlen = 10.
    append ls_fcat to pt_fieldcat.
    endform.
    For Icon:
    CONSTANTS:
         icon_id_failure            LIKE icon-id   VALUE ' ((Content component not found.)) @',
         icon_id_okay              LIKE icon-id   VALUE ' ((Content component not found.)) @'.
    TYPES: BEGIN OF ls_tab,
           matnr LIKE equi-matnr,
           maktx LIKE makt-maktx,
           b_werk  LIKE equi-werk,
           b_lager LIKE equi-lager,
           lgobe LIKE t001l-lgobe,
           sernr LIKE equi-sernr,
           icon LIKE icon-id,
           objnr LIKE equi-objnr,
          END OF   ls_tab.
    *Table that display the data for the ALV.
    DATA: itab  TYPE ls_tab OCCURS 0 WITH HEADER LINE.
        PERFORM get_h_date .
        IF h_date => sy-datum .
          itab-icon = icon_id_okay.
        ELSE .
          itab-icon = icon_id_failure.
         ENDIF.
    Regards
    Sudheer

  • Hi Experts, oo hierarchical alv, how to add checkbox on every header?

    Hi Experts,
    I am working on oo hierarchical alv, how can I add checkbox on every header? thanks in advance!
    Kind regards
    Dawson

    Hi Dawson,
    Just refer the below program & pass the check box functionality (mentioned in bold) in REUSE_ALV_HIERSEQ_LIST_DISPLAY in your program.
    TYPE-POOLS : slis.
    Data
    DATA : BEGIN OF itab OCCURS 0.
    INCLUDE STRUCTURE t001.
    DATA : flag tyPE c,
    END OF itab.
    DATA : alvfc TYPE slis_t_fieldcat_alv.
    DATA : alvly TYPE slis_layout_alv.
    Select Data
    SELECT * FROM t001 INTO TABLE itab.
    *------- Field Catalogue
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
    i_program_name = sy-repid
    i_internal_tabname = 'ITAB'
    i_inclname = sy-repid
    CHANGING
    ct_fieldcat = alvfc
    EXCEPTIONS
    inconsistent_interface = 1
    program_error = 2
    OTHERS = 3.
    Display
    alvly-box_fieldname = 'FLAG'.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    it_fieldcat = alvfc
    i_callback_program = sy-repid "<-------Important
    i_callback_user_command = 'ITAB_USER_COMMAND' "<------ Important
    is_layout = alvly
    TABLES
    t_outtab = itab
    EXCEPTIONS
    program_error = 1
    OTHERS = 2.
    CALL BACK FORM
    FORM itab_user_command USING whatcomm TYPE sy-ucomm whatrow TYPE
    slis_selfield.
    LOOP AT itab.
    itab-flag = 'X'.
    MODIFY itab.
    ENDLOOP.
    IMPORTANT.
    WHATROW-REFRESH = 'X'.
    ENDFORM. "ITAB_user_command
    Regards
    Abhii...

  • How to add a new tables in the existing Pricing Report

    Hi,
    I have created Z2 list report in the pricing report (V/LD) with some tables and field names.
    Now I got one requirement that i have to Add some more tables and filed names in the List Report Z2 in the pricing report.
    Could anyone helpme out how can i add tables and fileds names to the existing list report in the Pricing report
    Thanks for your support
    Best Regards
    Amjathpasha

    hi, Pasha:
    May i know how to solve this problem? as i also met this kind of problem.
    and i tried V/lb, do not find the place to add the table.
    Thanks,
    Linda

  • UIX: How to add linked view table columns to the Read-only table

    Hi
    I have two tables
    T1: ID, STAFF_ID, NOTE
    T2: STAFF_ID, USERNAME
    I have created corresponding entity objects (E1, E2), views (V1, V2), association A(E1->E2 as *..1 using STAFF_ID) and viewlink VL(V1->V2 as *..1 using association A).
    My model in AppModule looks like
    V1
    ----V2 via VL
    Now I have single UIX page in which I drop V1 as Read-only table. The table displays columns correctly: ID, STAFF_ID, NOTE
    What I want is to add a column STAFF_ID from the V2 into this table. I have tried to drop it into the table but when the page is run it does not display anything in that column. It has to do something with binding.
    I have done similar test with dropping V1 as read-only FORM and then added STAFF_ID from V2 as messageTextInput and everything is rendered correctly.
    Anyone knows how to do the same thing but with table?

    Yes that is true but I would like to give another example where this may not apply.
    Say I have 3 tables
    CLIENT(INDIVIDUAL_ID,...)
    ADDRESS(ADDRESS_ID,...)
    ADDRESS_HISTORY(ADDRESS_ID, INDIVIDUAL_ID,BEST_ADDRESS)
    where ADDRESS_HISTORY is intersection table in CLIENT to ADDRESS many to many relationship.
    Suppose I have VO2 that consists of ADDRESS and ADDRESS_HISTORY entities (corresponding association exists) and user needs to add new address for the selected customer in VO1 (made from CLIENT entity). There are several issues here:
    1) An input form made out of VO2 must contain an entry for BEST_ADDRESS flag but since it will be read-only, seems that this approach may not work. However, I found a post re:Updating view objects with multiple entities that provides workaround this.
    2) In that case assume that I use DBSequence to automatically add ADDRESS_ID when user inputs new record in this input form. I am using DB Trigger on ADDRESS table and have selected ADDRESS_ID in ADDRESS entity as DBSequence. Now observe that VO2 would contain another ADDRESS_ID from ADDRESS_HISTORY entity which has to be automatically populated with the same value. How?
    In a nutshell my question relates to the problem how to automatically populate intersection table when new record is added to the detail. But the trick is that some attributes of the intersection table must be inserted by the user in the form..
    Please advise

  • How to add checkboxes to frame

    So I have two classes in my package. I am having trouble adding the checkbox group to my frame. I got it to add to my applet but I can not figure out how to add it to my frame. Here is what I have so far. When I run this program it puts the checkboxes in my applet and not in my frame.
    this is my painter class:
    package pt;
    * <p>Title: </p>
    * <p>Description: </p>
    * <p>Copyright: Copyright (c) 2006</p>
    * <p>Company: </p>
    * @author unascribed
    * @version 1.0
    import java.applet.Applet;
    import java.awt.*;
    import java.awt.event.*;
    public class painter extends Applet {
    private int xValue=-10, yValue=-10;
    MyFrame x;
    Checkbox Red, Black, Magenta, Blue, Green, Yellow;
    CheckboxGroup cbg;
    public void init()
    x= new MyFrame("Christie's Window");
    x.show();
    x.resize(250,100);
    cbg = new CheckboxGroup();
           Red = new Checkbox("Red", cbg,true);
           Black = new Checkbox("Black", cbg,false);
           Magenta = new Checkbox("Magenta",cbg,false);
           Blue = new Checkbox("Blue", cbg, false);
           Green = new Checkbox("Green", cbg, false);
           Yellow = new Checkbox("Yellow", cbg, false);
           add(Red);
           add(Black);
           add(Magenta);
           add(Blue);
           add(Green);
           add(Yellow);
         addMouseMotionListener(new MotionHandler(this));
    public void paint(Graphics g)
    g.drawString("Drag the mouse to draw", 10, 20);
    g.fillOval(xValue, yValue, 4,4);
    //Override Component class update method to allow all ovals
    // to remain on the screen by not clearing the background
    public void update(Graphics g)   { paint(g); }
    // set the drawing coordinates and repaint
    public void setCoordinates(int x, int y)
      xValue = x;
      yValue = y;
      repaint();
    // Class to handle only mouse drag events for the Drag applet
    class MotionHandler extends MouseMotionAdapter {
      private painter dragger;
      public MotionHandler(painter d)  { dragger = d; }
      public void mouseDragged( MouseEvent e)
        { dragger.setCoordinates( e.getX(), e.getY() );   }
        } and here is MyFrame class:
    package pt;
    * <p>Title: </p>
    * <p>Description: </p>
    * <p>Copyright: Copyright (c) 2006</p>
    * <p>Company: </p>
    * @author unascribed
    * @version 1.0
    import java.applet.Applet;
    import java.awt.*;
    import java.awt.event.*;
    public class MyFrame extends Frame {
    MyFrame(String x){
       super(x);
        public boolean handleEvent(Event evtObj) {
          if(evtObj.id==Event.WINDOW_DESTROY) {
            hide();
            return true;
          return super.handleEvent(evtObj);
    }

    here's your conversion, with listeners to change the color
    //import java.applet.Applet;
    import java.awt.*;
    import java.awt.event.*;
    //public class painter extends Applet {
    class painter extends Frame {
    Color color = Color.RED;
    private int xValue=-10, yValue=-10;
    //MyFrame x;
    Checkbox Red, Black, Magenta, Blue, Green, Yellow;
    CheckboxGroup cbg;
    //public void init()
    public painter()
    //x= new MyFrame("Christie's Window");
    setTitle("Christie's Window");
    //x.show();
    //x.resize(250,100);
    setSize(600,400);
    setLocation(200,100);
    cbg = new CheckboxGroup();
           Red = new Checkbox("Red", cbg,true);
           Red.addItemListener(new ItemListener(){
            public void itemStateChanged(ItemEvent ie){
              if(Red.getState()) color = Color.RED;}});
           Black = new Checkbox("Black", cbg,false);
           Black.addItemListener(new ItemListener(){
            public void itemStateChanged(ItemEvent ie){
              if(Black.getState()) color = Color.BLACK;}});
           Magenta = new Checkbox("Magenta",cbg,false);
           Magenta.addItemListener(new ItemListener(){
            public void itemStateChanged(ItemEvent ie){
              if(Magenta.getState()) color = Color.MAGENTA;}});
           Blue = new Checkbox("Blue", cbg, false);
           Blue.addItemListener(new ItemListener(){
            public void itemStateChanged(ItemEvent ie){
              if(Blue.getState()) color = Color.BLUE;}});
           Green = new Checkbox("Green", cbg, false);
           Green.addItemListener(new ItemListener(){
            public void itemStateChanged(ItemEvent ie){
              if(Green.getState()) color = Color.GREEN;}});
           Yellow = new Checkbox("Yellow", cbg, false);
           Yellow.addItemListener(new ItemListener(){
            public void itemStateChanged(ItemEvent ie){
              if(Yellow.getState()) color = Color.YELLOW;}});
    Panel p = new Panel();
           p.add(Red);
           p.add(Black);
           p.add(Magenta);
           p.add(Blue);
           p.add(Green);
           p.add(Yellow);
    add(p,BorderLayout.NORTH);
         addMouseMotionListener(new MotionHandler(this));
    addWindowListener(new WindowAdapter(){
          public void windowClosing(WindowEvent we) { System.exit(0); }});
    public void paint(Graphics g)
    super.paint(g);
    g.setColor(color);
    g.drawString("Drag the mouse to draw", 10, 75);
    g.fillOval(xValue, yValue, 4,4);
    //Override Component class update method to allow all ovals
    // to remain on the screen by not clearing the background
    public void update(Graphics g)   { paint(g); }
    // set the drawing coordinates and repaint
    public void setCoordinates(int x, int y)
      xValue = x;
      yValue = y;
      repaint();
    // Class to handle only mouse drag events for the Drag applet
    class MotionHandler extends MouseMotionAdapter {
      private painter dragger;
      public MotionHandler(painter d)  { dragger = d; }
      public void mouseDragged( MouseEvent e)
        { dragger.setCoordinates( e.getX(), e.getY() );   }
      public static void main(String[] args){new painter().setVisible(true);}
    }

  • How to add rows in table control for data recording BDC?

    hello,
    pl tell me the way to upload data through BDC in table control of screen .
    how to add fields inrecording of table control?
    Please give some code in this regard.
    I am generous in giving points..pl help!

    Hi,
    While doing code under recording first you need to do the recording with sample data under a particular transaction like T-code XK01 (Vendor creation).
    Take an example of create vendor using T-code XK01:
    Go to t-code 'SHDB' under make recording for XK01 with sample data and once if you complete the recording means after vendor creation check the source code bye by pressing the button  'Program', it shows the total coding for recording of what you entered the test data.
    Then you will create one program and copy that source code of recording into your program, and now you have to remove the values at perform statement and give the internal table field name.
    Like that you can develop your own code along with your validations.
    my best suggestion is don’t see the example code of recording method because any one for standard t-code should get the code from recording with sample data, so first tryout with your own recording method and you can understand the code step by step.
    With these I hope you will get some idea of recoding method.
    Let me know for further doubts.
    Regards,
    Vijay.

  • Create Tabular Form wizard - how to add rows to Table / View Owner list?

    Create Tabular Form wizard asks to choose "Table / View Owner"
    How to add additional schemas/users to this "Table / View Owner" dropdown list?

    Next step:
    I tried to create 2nd application - and it sees and allows to select from schemas I added in previous step.
    Then I tried to add 1 more schema - and 2nd application can't see it...
    I create 3rd application and select 1st schema (assigned when workspace was created) - and it sees only this one schema
    I create 4th application and select another schema (added in previous steps) - and it sees 2 schemas from 4 assigned
    what is this?
    how to live with it?

  • How to add a new table or view in the view object

    hello,every one.
    I wanna add a new table or view in the view object's query statement.
    when the table or view not in the where clause,the query statement is working fine.
    If they in the where clause,I got the "java.lang.NullPointerException".
    who can help me
    thank you very much

    thank you for your reply
    I wanna extend the VO
    oracle.apps.pay.selfservice.payslip.US.server.PayPayslipGetPersonDetail
    the original sql is:
    SELECT ppf.person_id,
    FROM per_people_f ppf,
    per_assignments_f paf,
    pay_assignment_actions paa
    where paa.assignment_action_id = :1 AND paf.assignment_id = paa.assignment_id AND SYSDATE BETWEEN paf.effective_start_date AND paf.effective_end_date AND paf.person_id = ppf.person_id
    I wanna extend:
    SELECT ppf.person_id, pay_v.element_name,pay_v.assignment_action_id
    FROM per_people_f ppf,
    per_assignments_f paf,
    pay_assignment_actions paa,
    pay_run_results_v pay_v
    where paa.assignment_action_id = :1 AND paf.assignment_id = paa.assignment_id AND SYSDATE BETWEEN paf.effective_start_date AND paf.effective_end_date AND paf.person_id = ppf.person_id
    pay_v.assignment_action_id =paa.assignment_action_id
    if the pay.v in the where clause. I will got the exception. whereas,it's works fine.

  • How to add radiobutton in table control

    dear all
    i want to add radiobutton in table control and want to select the corresponding data
    & display that selected data in another screen
    please guide.
    Moderator Message: Please search for available information before posting.
    Edited by: kishan P on Jun 3, 2011 4:08 PM

    Hi,
    Go through the below link.
    <<link removed by moderator>>
    Hope it will be useful to you.
    Edited by: kishan P on Jun 3, 2011 4:07 PM

  • How to add CheckBoxs to a scrollPane

    I have a file I�m getting user info out of and finding certain information the
    User enters, I�m making a query, I�m taking the found items and making an array of Checkboxes out of them witch is working my problem is adding the Checkboxes to the scroll Pane
    public class Frame1 extends JFrame{
    public static Panel listan = new Panel();
    JCheckBox[] jCheckBox1 ;
    JScrollPane scrollPane1 = new JScrollPane(list);
    //other Window objects
    //first method
    private void jbInit() throws Exception {
    //puts all window objects together
    // Constructs user screen
    list.setLayout(verticalFlowLayout1);
    panel1.add(scrollPane1, new XYConstraints(118, 32, 128, 195));
    // i have a find buttion that takes all infoamtion out of file
    // and puts in an array then finds user enterd infomation
    // this is just example code that just adds CheckBoxs to the scrollPane
    // and is Basically the same way the other program does
    // second method
    void addcheckbox_actionPerformed(ActionEvent e) {
    jCheckBox1 = new JCheckBox[50];
    for (int i = 0; i < 50; i++) {
    String checkboxText = ("Checkbox #: " + (i + 1));
    jCheckBox1[i] = new JCheckBox(checkboxText);
    for (int i = 0; i < 50; i++) {
    list.add(jCheckBox1, null);
    My problem is that I can�t add the checkboxes at the second method but it works in the first, I can add in the first because I initialize in the second.

    If you want something to compile here is all my example code
    I will incorporate it to my 30 page program
    Here is what I want my code to do
    package list;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import com.borland.jbcl.layout.*;
    import java.awt.Checkbox;
    * <p>Title: </p>
    * <p>Description: </p>
    * <p>Copyright: Copyright (c) 2008</p>
    * <p>Company: </p>
    * @author not attributable
    * @version 1.0
    public class Frame1 extends JFrame {
      public static boolean ch=true;
      JPanel contentPane;
      GridLayout gridLayout1 = new GridLayout();
      JPanel panel1 = new JPanel();
      XYLayout xYLayout1 = new XYLayout();
      JButton jButton1;
      JButton jButton2;
      JButton addcheckbox;
      JCheckBox[] jCheckBox1 ;
      JScrollPane scrollPane1 = new JScrollPane();
      JPanel list = new JPanel();
      VerticalFlowLayout verticalFlowLayout1 = new VerticalFlowLayout();
      //Construct the frame
      public Frame1() {
        enableEvents(AWTEvent.WINDOW_EVENT_MASK);
        try {
          jbInit();
        catch (Exception e) {
          e.printStackTrace();
      //Component initialization
    // method one
      private void jbInit() throws Exception {
        contentPane = (JPanel)this.getContentPane();
        jButton1 = new JButton();
        jButton2 = new JButton();
        addcheckbox = new JButton();
        this.setContentPane(contentPane);
        this.setLocale(java.util.Locale.getDefault());
        this.setResizable(false);
        this.setSize(new Dimension(400, 300));
        this.setState(Frame.NORMAL);
        this.setTitle("Frame Title");
        contentPane.setOpaque(true);
        contentPane.setRequestFocusEnabled(true);
        contentPane.setLayout(gridLayout1);
        panel1.setLayout(xYLayout1);
        jButton1.setSelected(false);
        jButton1.setText("Print");
        jButton1.addActionListener(new Frame1_jButton1_actionAdapter(this));
        jButton2.setText("select all/none");
        jButton2.addActionListener(new Frame1_jButton2_actionAdapter(this));
        addcheckbox.setBorderPainted(true);
        addcheckbox.setText("add");
        addcheckbox.addActionListener(new Frame1_addcheckbox_actionAdapter(this));
        scrollPane1.setLocale(java.util.Locale.getDefault());
        list.setLayout(verticalFlowLayout1);
        contentPane.add(panel1, null);
        panel1.add(scrollPane1, new XYConstraints(118, 32, 128, 195));
        scrollPane1.getViewport().add(list, null);
        //scrollPane1.add(listan, null);
        panel1.add(jButton1, new XYConstraints(261, 92, 90, 39));
        panel1.add(jButton2,   new XYConstraints(262, 152, 108, 30));
        panel1.add(addcheckbox, new XYConstraints(25, 49, -1, 35));
      //Overridden so we can exit when window is closed
      protected void processWindowEvent(WindowEvent e) {
        super.processWindowEvent(e);
        if (e.getID() == WindowEvent.WINDOW_CLOSING) {
          System.exit(0);
      void jButton1_actionPerformed(ActionEvent e) {
        String checkprint = "selected:\n";
        for (int x = 0; x < jCheckBox1.length; x++) {
          if (jCheckBox1[x].isSelected()) {
             checkprint = checkprint + jCheckBox1[x].getText()+"\n";
        System.out.println(checkprint);
      void jButton2_actionPerformed(ActionEvent e) {
        for (int x = 0; x < jCheckBox1.length; x++) {
          if (ch == true) {
            jCheckBox1[x].setSelected(true);
          else{
            jCheckBox1[x].setSelected(false);
    if (ch == true)
          ch=false;
        else
          ch=true;
    //method two
      void addcheckbox_actionPerformed(ActionEvent e) {
        jCheckBox1 = new JCheckBox[50];
            for (int i = 0; i < 50; i++) {
              String checkboxText = ("Checkbox #: " + (i + 1));
              jCheckBox1[i] = new JCheckBox(checkboxText);
            for (int i = 0; i < 50; i++) {
             list.add(jCheckBox1, null);
    class Frame1_jButton1_actionAdapter implements java.awt.event.ActionListener {
    Frame1 adaptee;
    Frame1_jButton1_actionAdapter(Frame1 adaptee) {
    this.adaptee = adaptee;
    public void actionPerformed(ActionEvent e) {
    adaptee.jButton1_actionPerformed(e);
    class Frame1_jButton2_actionAdapter implements java.awt.event.ActionListener {
    Frame1 adaptee;
    Frame1_jButton2_actionAdapter(Frame1 adaptee) {
    this.adaptee = adaptee;
    public void actionPerformed(ActionEvent e) {
    adaptee.jButton2_actionPerformed(e);
    class Frame1_addcheckbox_actionAdapter implements java.awt.event.ActionListener {
    Frame1 adaptee;
    Frame1_addcheckbox_actionAdapter(Frame1 adaptee) {
    this.adaptee = adaptee;
    public void actionPerformed(ActionEvent e) {
    adaptee.addcheckbox_actionPerformed(e);
    }doesn�t work but if I take all of method two and put it in one it workspackage list;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import com.borland.jbcl.layout.*;
    import java.awt.Checkbox;
    * <p>Title: </p>
    * <p>Description: </p>
    * <p>Copyright: Copyright (c) 2008</p>
    * <p>Company: </p>
    * @author not attributable
    * @version 1.0
    public class Frame1 extends JFrame {
    public static boolean ch=true;
    JPanel contentPane;
    GridLayout gridLayout1 = new GridLayout();
    JPanel panel1 = new JPanel();
    XYLayout xYLayout1 = new XYLayout();
    JButton jButton1;
    JButton jButton2;
    JButton addcheckbox;
    JCheckBox[] jCheckBox1 ;
    JScrollPane scrollPane1 = new JScrollPane();
    JPanel list = new JPanel();
    VerticalFlowLayout verticalFlowLayout1 = new VerticalFlowLayout();
    //Construct the frame
    public Frame1() {
    enableEvents(AWTEvent.WINDOW_EVENT_MASK);
    try {
    jbInit();
    catch (Exception e) {
    e.printStackTrace();
    //Component initialization
    private void jbInit() throws Exception {
    // this is the same code in method two
    jCheckBox1 = new JCheckBox[50];
    for (int i = 0; i < 50; i++) {
    String checkboxText = ("Checkbox #: " + (i + 1));
    jCheckBox1[i] = new JCheckBox(checkboxText);
    for (int i = 0; i < 50; i++) {
    list.add(jCheckBox1[i], null);
    contentPane = (JPanel)this.getContentPane();
    jButton1 = new JButton();
    jButton2 = new JButton();
    addcheckbox = new JButton();
    this.setContentPane(contentPane);
    this.setLocale(java.util.Locale.getDefault());
    this.setResizable(false);
    this.setSize(new Dimension(400, 300));
    this.setState(Frame.NORMAL);
    this.setTitle("Frame Title");
    contentPane.setOpaque(true);
    contentPane.setRequestFocusEnabled(true);
    contentPane.setLayout(gridLayout1);
    panel1.setLayout(xYLayout1);
    jButton1.setSelected(false);
    jButton1.setText("Print");
    jButton1.addActionListener(new Frame1_jButton1_actionAdapter(this));
    jButton2.setText("select all/none");
    jButton2.addActionListener(new Frame1_jButton2_actionAdapter(this));
    addcheckbox.setBorderPainted(true);
    addcheckbox.setText("add");
    addcheckbox.addActionListener(new Frame1_addcheckbox_actionAdapter(this));
    scrollPane1.setLocale(java.util.Locale.getDefault());
    list.setLayout(verticalFlowLayout1);
    contentPane.add(panel1, null);
    panel1.add(scrollPane1, new XYConstraints(118, 32, 128, 195));
    scrollPane1.getViewport().add(list, null);
    //scrollPane1.add(listan, null);
    panel1.add(jButton1, new XYConstraints(261, 92, 90, 39));
    panel1.add(jButton2, new XYConstraints(262, 152, 108, 30));
    panel1.add(addcheckbox, new XYConstraints(25, 49, -1, 35));
    //Overridden so we can exit when window is closed
    protected void processWindowEvent(WindowEvent e) {
    super.processWindowEvent(e);
    if (e.getID() == WindowEvent.WINDOW_CLOSING) {
    System.exit(0);
    void jButton1_actionPerformed(ActionEvent e) {
    String checkprint = "selected:\n";
    for (int x = 0; x < jCheckBox1.length; x++) {
    if (jCheckBox1[x].isSelected()) {
    checkprint = checkprint + jCheckBox1[x].getText()+"\n";
    System.out.println(checkprint);
    void jButton2_actionPerformed(ActionEvent e) {
    for (int x = 0; x < jCheckBox1.length; x++) {
    if (ch == true) {
    jCheckBox1[x].setSelected(true);
    else{
    jCheckBox1[x].setSelected(false);
    if (ch == true)
    ch=false;
    else
    ch=true;
    void addcheckbox_actionPerformed(ActionEvent e) {
    class Frame1_jButton1_actionAdapter implements java.awt.event.ActionListener {
    Frame1 adaptee;
    Frame1_jButton1_actionAdapter(Frame1 adaptee) {
    this.adaptee = adaptee;
    public void actionPerformed(ActionEvent e) {
    adaptee.jButton1_actionPerformed(e);
    class Frame1_jButton2_actionAdapter implements java.awt.event.ActionListener {
    Frame1 adaptee;
    Frame1_jButton2_actionAdapter(Frame1 adaptee) {
    this.adaptee = adaptee;
    public void actionPerformed(ActionEvent e) {
    adaptee.jButton2_actionPerformed(e);
    class Frame1_addcheckbox_actionAdapter implements java.awt.event.ActionListener {
    Frame1 adaptee;
    Frame1_addcheckbox_actionAdapter(Frame1 adaptee) {
    this.adaptee = adaptee;
    public void actionPerformed(ActionEvent e) {
    adaptee.addcheckbox_actionPerformed(e);
    }Edited by: deme on Feb 27, 2008 6:48 AM
    Edited by: deme on Feb 27, 2008 6:51 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to add checkboxes to frames?

    Hi,
    I am trying to add checkboxes to a frame which will then be instantiated from an applet. I can launch the frame correctly from my applet but it always displays the last checkbox added only. So in my code below it would always display the 'Black' checkbox.
    Could anyone please tell me what I am doing wrong or not doing here?
    import java.awt.*;
    import java.applet.*;
    class Chooser extends Frame {
         Chooser(String title) {
              super(title);
              Checkbox cRed;
              Checkbox cBlack;
              CheckboxGroup cbg = new CheckboxGroup( );
              cRed = new Checkbox("Red", cbg, true);
              cBlack = new Checkbox("Black", cbg, false);
              add(cRed);
              add(cBlack);
            public boolean handleEvent(Event evtObj) {
              if (evtObj.id == Event.WINDOW_DESTROY) {
                   hide( );
                   return true;
              return super.handleEvent(evtObj);
         public void paint(Graphics g) {
              g.drawString("Chooser Frame",10,40);
    }Thanks
    Avi
    Message was edited by:
    avi22
    Message was edited by:
    avi22

    add a pack() statement to your Chooser constructor as the last statement before the end of the constructor
      Chooser(String title){
    //    your code here
        this.pack();

  • How to add column in table control for transaction APPCREATE

    Hi All,
    How can i add the additional column in table control for transaction APPCREATE.
    There is structure PT1045_EXT present behind table control. But not found any customer exit or badi to display on screen.
    Please help...

    You can add new columns
    If you add new columns in tr. PHAP_CATALOG

  • Bex reporting (how to add a column/table by using macros)

    Hai,
    can anyone help me in this reagrd..
    iam trying to enhance a query..
    the requirement is to add a separate column/table to the right side of the result area..say 0country.
    the affected materials should display only once in the country coloumn/table.
            but the thing is to display a charecteristic after the keyfigures...i mean to the right of the result area..
    let me know how to do this...
    regards,
    rambo..

    Hi,
    Put 0COUNTRY into query and press 'Table Display' icon. Vary char position (rows, columns, before, after).
    It should do the trick.
    Certainly, 0COUNTRY will be INSIDE resultarea. But, I think, it's not end in itself.
    Best regards,
    Eugene

  • How to add a dynamic table name in Report Builder Query ?

    I have some problem while creating a report in report builder 6i.
    My data is managed as in tables like this abc_012006, abc_022006 etc , so I want to query data according to the month user have selected from the parameter form. Let suppose if user entered 012006 as month year then data must be fetched from abc_012006.
    Can any one tell me the appropriate tip for this problem.
    Message was edited by:
    [email protected]

    Hello,
    Once you get the Data Set create save it as XML and then create a new report off the XML file. Then you can set the data set to the report and the XML is not required any more.
    First, to be able add fields to a report you need to use RAS. Report.Engine doesn't have the ability.
    If you search in this forum you will find lots of examples on how to...
    If you want to create the report then see these RAS samples:
    http://wiki.sdn.sap.com/wiki/display/BOBJ/NETRASSDK+Samples#NETRASSDKSamples-Exporting%2FPrinting
    Don

Maybe you are looking for

  • Validating a text field that has date in the format mm/dd/yyyy

    How can I validate a text field such that it should be in the format mm/dd/yyyy and it should not be greater that a particular date. for example the date I enter should not be greater than 01/01/2007

  • Black band issue across screen

    hello, i have just switched on my mac to discover that there us a blackband of interferece across the screen. above it is a similar band of displaced apple screen approx 10mm high and across the entire length of the sreeen. any ideas on how t get rid

  • The Adobe PDF Maker could not be loaded

    With Acrobat 9, XP and Office 2007... When in Word 2007, I click  "Adobe" on the toolbar to convert the Word file to pdf. However, when I do this, I get the message "The Adobe PDF Maker could not be loaded" and am given the option to run Repair Mode.

  • Character formats turn on change bars

    Hi all My colleague has noticed something very strange in Framemaker 12. He's created a new character tag, applied it, and hey presto, a change bar appears. We've checked the character designer, and Change Bars is not selected for that character styl

  • CS6 error

    When I open CS6 I get the following error: The procedure entry point ?initialize@Library@OGL@AIF@@SAXPEAVContext@23AEBVInitOptions@ExtensionManager@23@@Z could not be located in the dynamic link library aif_ogl.dll How can I repair this? Thanks, Terr