How to show different types of components in acolumn of a dataTable?

Hi All,
Based on the conditions, I may want to show outputText field in row 1 and Link in row two for a particular column. of a dataTable.
How can I do this??
Thanks
Sudhakar

Giri I have found a way to show various components on conditional basis
Here is the below example for that approach
1. Create a new Project
2. Drag a dataTable component on default page (created by creator)
3. Remove column 3
4. Remove dummy data from Column 2
5. drag OutputText Object into Column2
6. drag Image component into column 2
7. drag checkBox component into Column 2. Now youe Page1.jsp code should look like something like Below
<h:dataTable binding="#{Page1.dataTable1}" headerClass="list-header" id="dataTable1" rowClasses="list-row-even,list-row-odd"
                        style="left: 192px; top: 120px; position: absolute" value="#{Page1.dataTable1Model}" var="currentRow">
                        <h:column binding="#{Page1.column1}" id="column1">
                            <h:outputText binding="#{Page1.outputText1}" id="outputText1" value="#{currentRow['COLUMN1']}"/>
                            <f:facet name="header">
                                <h:outputText binding="#{Page1.outputText2}" id="outputText2" value="Number"/>
                            </f:facet>
                        </h:column>
                        <h:column binding="#{Page1.column2}" id="column2">
                            <f:facet name="header">
                                <h:outputText binding="#{Page1.outputText4}" id="outputText4" value="Image/Text/CheckBox"/>
                            </f:facet>
                            <h:outputText binding="#{Page1.outputText7}" id="outputText7"/>
                            <h:graphicImage binding="#{Page1.image1}" id="image1" value="resources/prime.GIF"/>
                            <h:selectBooleanCheckbox binding="#{Page1.checkbox1}" id="checkbox1"/>
                        </h:column>
                    </h:dataTable>8. Now create a bean Called NumberBean
9. Add properties oddRender,evenRender,primeRender of type boolean
10.Add private method "isPrime" in Page1.java(default bean created by studio creator)
* NumberBean.java
* Created on July 16, 2005, 12:08 PM
package webapplication11;
* @author  user
public class NumberBean {
     * Holds value of property oddRender.
    private boolean oddRender;
     * Holds value of property evenRender.
    private boolean evenRender;
     * Holds value of property primeRender.
    private boolean primeRender;
     * Holds value of property value.
    private int value;
    /** Creates a new instance of NumberBean */
    public NumberBean() {
     * Getter for property oddRender.
     * @return Value of property oddRender.
    public boolean isOddRender() {
        return this.oddRender;
     * Setter for property oddRender.
     * @param oddRender New value of property oddRender.
    public void setOddRender(boolean oddRender) {
        this.oddRender = oddRender;
     * Getter for property evenRender.
     * @return Value of property evenRender.
    public boolean isEvenRender() {
        return this.evenRender;
     * Setter for property evenRender.
     * @param evenRender New value of property evenRender.
    public void setEvenRender(boolean evenRender) {
        this.evenRender = evenRender;
     * Getter for property primeRender.
     * @return Value of property primeRender.
    public boolean isPrimeRender() {
        return this.primeRender;
     * Setter for property primeRender.
     * @param primeRender New value of property primeRender.
    public void setPrimeRender(boolean primeRender) {
        this.primeRender = primeRender;
     * Getter for property value.
     * @return Value of property value.
    public int getValue() {
        return this.value;
     * Setter for property value.
     * @param value New value of property value.
    public void setValue(int value) {
        this.value = value;
private boolean isPrime(int prime)
        if(prime==2)
            return true;
        int factors=0;
        for(int i=1;i<=prime;i++)
            if(prime%i==0)
                factors++;
            if(factors>2)
                return false;
        return true;
    }11. Now add the NumberBean array as property in Page1.java
12. You will see following methods and private variable in Page1.java file
     * Getter for property numberBeanArray.
     * @return Value of property numberBeanArray.
    public NumberBean[] getNumberBeanArray() {
        return this.numberBeanArray;
     * Setter for property numberBeanArray.
     * @param numberBean New value of property numberBeanArray.
    public void setNumberBeanArray(NumberBean[] numberBeanArray) {
        this.numberBeanArray = numberBeanArray;
     * Holds value of property numberBeanArray.
    private NumberBean[] numberBeanArray;
    13 Now modify the Constructor of Page1.java as below
         java.util.Vector results=new java.util.Vector();
            for(int i=1;i<=100;i++)
                NumberBean bean=new NumberBean();
                bean.setValue(i);
                if(i%2==0)
                    bean.setEvenRender(true);
                    bean.setOddRender(false);
                else
                    bean.setEvenRender(false);
                    bean.setOddRender(true);
                if(isPrime(i))
                    bean.setPrimeRender(true);
                else
                    bean.setPrimeRender(false);
          results.add(bean);
            numberBeanArray=(NumberBean[])results.toArray(new NumberBean[results.size()]);
       14. Now Change the JSP code as below
<h:dataTable binding="#{Page1.dataTable1}" headerClass="list-header" id="dataTable1" rowClasses="list-row-even,list-row-odd"
                        style="left: 192px; top: 120px; position: absolute" value="#{Page1.numberBeanArray}" var="currentRow">
                        <h:column binding="#{Page1.column1}" id="column1">
                            <h:outputText binding="#{Page1.outputText1}" id="outputText1" value="#{currentRow['value']}"/>
                            <f:facet name="header">
                                <h:outputText binding="#{Page1.outputText2}" id="outputText2" value="Number"/>
                            </f:facet>
                        </h:column>
                        <h:column binding="#{Page1.column2}" id="column2">
                            <f:facet name="header">
                                <h:outputText binding="#{Page1.outputText4}" id="outputText4" value="Image/Text/CheckBox"/>
                            </f:facet>
                            <h:outputText binding="#{Page1.outputText7}" id="outputText7" rendered="#{currentRow['oddRender']}" value="Odd Number"/>
                            <h:graphicImage binding="#{Page1.image1}" id="image1" rendered="#{currentRow['primeRender']}" value="resources/prime.GIF"/>
                            <h:selectBooleanCheckbox binding="#{Page1.checkbox1}" id="checkbox1" rendered="#{currentRow['evenRender']}" value="Even Number"/>
                        </h:column>
                    </h:dataTable>JSF model really helps in various scenarios. Only thing we need is patience, Better understanding on Framework and some Investigative knowledge. :-)
Thanks
Sudhakar

Similar Messages

  • I have found a solution to show different types of components in a column

    Hi All,
    I have asked this question a while back at this thread
    http://swforum.sun.com/jive/thread.jspa?messageID=209845
    Now I am able to find the solution for it.
    I wanted to share this with you guys :)
    Here is the approach
    1. Create a new Project
    2. Drag a dataTable component on default page (created by creator)
    3. Remove column 3
    4. Remove dummy data from Column 2
    5. drag OutputText Object into Column2
    6. drag Image component into column 2
    7. drag checkBox component into Column 2. Now youe Page1.jsp code should look like something like Below
    <h:dataTable binding="#{Page1.dataTable1}" headerClass="list-header" id="dataTable1" rowClasses="list-row-even,list-row-odd"
                            style="left: 192px; top: 120px; position: absolute" value="#{Page1.dataTable1Model}" var="currentRow">
                            <h:column binding="#{Page1.column1}" id="column1">
                                <h:outputText binding="#{Page1.outputText1}" id="outputText1" value="#{currentRow['COLUMN1']}"/>
                                <f:facet name="header">
                                    <h:outputText binding="#{Page1.outputText2}" id="outputText2" value="Number"/>
                                </f:facet>
                            </h:column>
                            <h:column binding="#{Page1.column2}" id="column2">
                                <f:facet name="header">
                                    <h:outputText binding="#{Page1.outputText4}" id="outputText4" value="Image/Text/CheckBox"/>
                                </f:facet>
                                <h:outputText binding="#{Page1.outputText7}" id="outputText7"/>
                                <h:graphicImage binding="#{Page1.image1}" id="image1" value="resources/prime.GIF"/>
                                <h:selectBooleanCheckbox binding="#{Page1.checkbox1}" id="checkbox1"/>
                            </h:column>
                        </h:dataTable>8. Now create a bean Called NumberBean
    9. Add properties oddRender,evenRender,primeRender of type boolean
    * NumberBean.java
    * Created on July 16, 2005, 12:08 PM
    package webapplication11;
    * @author  user
    public class NumberBean {
         * Holds value of property oddRender.
        private boolean oddRender;
         * Holds value of property evenRender.
        private boolean evenRender;
         * Holds value of property primeRender.
        private boolean primeRender;
         * Holds value of property value.
        private int value;
        /** Creates a new instance of NumberBean */
        public NumberBean() {
         * Getter for property oddRender.
         * @return Value of property oddRender.
        public boolean isOddRender() {
            return this.oddRender;
         * Setter for property oddRender.
         * @param oddRender New value of property oddRender.
        public void setOddRender(boolean oddRender) {
            this.oddRender = oddRender;
         * Getter for property evenRender.
         * @return Value of property evenRender.
        public boolean isEvenRender() {
            return this.evenRender;
         * Setter for property evenRender.
         * @param evenRender New value of property evenRender.
        public void setEvenRender(boolean evenRender) {
            this.evenRender = evenRender;
         * Getter for property primeRender.
         * @return Value of property primeRender.
        public boolean isPrimeRender() {
            return this.primeRender;
         * Setter for property primeRender.
         * @param primeRender New value of property primeRender.
        public void setPrimeRender(boolean primeRender) {
            this.primeRender = primeRender;
         * Getter for property value.
         * @return Value of property value.
        public int getValue() {
            return this.value;
         * Setter for property value.
         * @param value New value of property value.
        public void setValue(int value) {
            this.value = value;
    }10.Add private method "isPrime" in Page1.java(default bean created by studio creator)
    private boolean isPrime(int prime)
            if(prime==2)
                return true;
            int factors=0;
            for(int i=1;i<=prime;i++)
                if(prime%i==0)
                    factors++;
                if(factors>2)
                    return false;
            return true;
        }11. Now add the NumberBean array as property in Page1.java
    12. You will see following methods and private variable in Page1.java file
         * Getter for property numberBeanArray.
         * @return Value of property numberBeanArray.
        public NumberBean[] getNumberBeanArray() {
            return this.numberBeanArray;
         * Setter for property numberBeanArray.
         * @param numberBean New value of property numberBeanArray.
        public void setNumberBeanArray(NumberBean[] numberBeanArray) {
            this.numberBeanArray = numberBeanArray;
         * Holds value of property numberBeanArray.
        private NumberBean[] numberBeanArray;
        13 Now modify the Constructor of Page1.java as below
             java.util.Vector results=new java.util.Vector();
                for(int i=1;i<=100;i++)
                    NumberBean bean=new NumberBean();
                    bean.setValue(i);
                    if(i%2==0)
                        bean.setEvenRender(true);
                        bean.setOddRender(false);
                    else
                        bean.setEvenRender(false);
                        bean.setOddRender(true);
                    if(isPrime(i))
                        bean.setPrimeRender(true);
                    else
                        bean.setPrimeRender(false);
              results.add(bean);
                numberBeanArray=(NumberBean[])results.toArray(new NumberBean[results.size()]);
           14. Now Change the JSP code as below
    <h:dataTable binding="#{Page1.dataTable1}" headerClass="list-header" id="dataTable1" rowClasses="list-row-even,list-row-odd"
                            style="left: 192px; top: 120px; position: absolute" value="#{Page1.numberBeanArray}" var="currentRow">
                            <h:column binding="#{Page1.column1}" id="column1">
                                <h:outputText binding="#{Page1.outputText1}" id="outputText1" value="#{currentRow['value']}"/>
                                <f:facet name="header">
                                    <h:outputText binding="#{Page1.outputText2}" id="outputText2" value="Number"/>
                                </f:facet>
                            </h:column>
                            <h:column binding="#{Page1.column2}" id="column2">
                                <f:facet name="header">
                                    <h:outputText binding="#{Page1.outputText4}" id="outputText4" value="Image/Text/CheckBox"/>
                                </f:facet>
                                <h:outputText binding="#{Page1.outputText7}" id="outputText7" rendered="#{currentRow['oddRender']}" value="Odd Number"/>
                                <h:graphicImage binding="#{Page1.image1}" id="image1" rendered="#{currentRow['primeRender']}" value="resources/prime.GIF"/>
                                <h:selectBooleanCheckbox binding="#{Page1.checkbox1}" id="checkbox1" rendered="#{currentRow['evenRender']}" value="Even Number"/>
                            </h:column>
                        </h:dataTable>And also you can downloqad this from my personal link
    http://www.geocities.com/sudhakar_koundinya/code.zip
    Thanks & Best Regards
    Sudhakar

    Hi,
    Thanks for sharing the solution. This helps the developer community a lot.
    Thanks,
    Rk

  • How to show BLOB type Column ? In XE

    How to show BLOB type Column as image in APEX report area? (In XE)
    I did it with the following procedure
    create or replace PROCEDURE MY_IMAGE_DISPLAY (p_image_id IN NUMBER)
    AS
    l_mime VARCHAR2 (255);
    l_length NUMBER;
    l_file_name VARCHAR2 (2000);
    lob_loc BLOB;
    BEGIN
    SELECT 'JPEG', MLOGO, 'IMAGE', DBMS_LOB.getlength (MLOGO)
    INTO l_mime, lob_loc, l_file_name, l_length
    FROM CARS_TABLE
    WHERE M_ID = p_image_id;
    OWA_UTIL.mime_header (NVL (l_mime, 'application/octet'), FALSE);
    HTP.p ('Content-length: ' || l_length);
    OWA_UTIL.http_header_close;
    WPG_DOCLOAD.download_file (lob_loc);
    END my_image_display;
    GRANT EXECUTE ON my_image_display TO PUBLIC;
    and executed the following command
    CREATE PUBLIC SYNONYM my_image_display FOR shema_name.my_image_display;
    but under XE , I can not see synonym? why?

    sakrami,
    Your question really belongs in the XE forum:
    Oracle Database Express Edition (XE)
    I think this posting addresses your question:
    Re: Handling of pictures changed? Item values not properly updated in Beta
    Joel

  • How to show different Look & Feel to different users?

    Hi,
    how to show different Look & Feel to different users?
    Thanks & Regards,
    Venu--

    If you want the user to select then LookAndFeel then Visitor Tools.
    If you want to use code and dynamically change it then http://download.oracle.com/docs/cd/E13155_01/wlp/docs103/javadoc/index.html?com/bea/netuix/laf/PortalLookAndFeel.html
    if you have only a few combinations then you could even create different desktops and direct the user to the appropriate url

  • How to send different type of data

    Hello, everyone,
    I am trying to send different types of data between client and server.
    For example, from server to client, I need to send some String data, using PrintWriter.println(String n); and send some other stuff using OutputStream.write(byte[] b, int x, int y). What I did is setting up a socket, then send them one by one. But it didn't work.
    I am just wondering if there is anything I need to do right after I finished sending the String data and before I start sending other stuff using OutputStream. (Because if I only send one of them, then it works; but when I send them together, then the error always happened to the second one no matter I use PrintWriter first or the OutputStream first)

    To send mixed type of data by hand allways using the same output/input stream, you could do:
    on server side
            ServerSocket serverSocket = null;
            Socket clientSocket = null;
            OutputStream out = null;
            try
                /*setup a socket*/
                serverSocket = new ServerSocket(4444);
                clientSocket = clientSocket = serverSocket.accept();
                out = new BufferedOutputStream(clientSocket.getOutputStream());
                /*send a byte*/
                int send1 = 3;
                out.write(send1);
                /*send a string with a line termination*/
                String send2 = "a string sample";
                out.write(send2.getBytes("ISO-8859-1"));
                out.write('\n');
            finally
                try { out.close(); }
                catch (Exception e) {}
                try { clientSocket.close(); }
                catch (Exception e) {}
                try { serverSocket.close(); }
                catch (Exception e) {}
    on client side
            Socket clientSocket = null;
            InputStream in = null;
            try
                clientSocket = new Socket("localhost", 4444);
                in = new BufferedInputStream(clientSocket.getInputStream());
                /*receive the byte*/
                int receive1 = in.read();
                System.out.println("The received message #1 is: " + receive1);
                /*receive the string up to the line termination*/
                ByteArrayOutputStream baos = new ByteArrayOutputStream();
                int c;
                while (((c = in.read()) != '\n') && (c != -1))
                    baos.write(c);
                String receive2 = baos.toString("ISO-8859-1");
                System.out.println("the received message #2 is: " + receive2);
            finally
                try { in.close(); }
                catch (Exception e) {}
                try { clientSocket.close(); }
                catch (Exception e) {}

  • How to Show Different set of  Blob images in every page

    Hi i am using Crystal Report Server XI RAS Embedded Edition to built Dynamic Reports.
    Now i  have two datasets
    1. Main query with imageid field
    2. list of image blobs.
    this two datasets are linked with imageid  field and binded to ReportClientDocument.
    i have to show different image fields in every page of the report.  this images are differ in width and heights.
    i am able to show a single constant image field object from blob database field.
    but i could not able to find the solution to show different set of multiple images in different pages of the report.
    is there any formulas can be written or kindy give me a solution to achieve this.
    Regards,
    Padmanaban V
    Edited by: Padmanaban Viswanathan on Mar 15, 2010 11:59 AM

    See RAS samples [here|https://wiki.sdn.sap.com/wiki/display/BOBJ/NETRASSDK+Samples]. Look for "NET-CS2003_RAS-Managed_BE115_Add_Image" or "NET-VB2003_RAS-Managed_BE115_Add_Image-From-File".
    Ludek

  • How to show different size of custom fonts on different mobiles

    I am currently working on a J2ME project on which we are using low level API. We want to display custom fonts on mobiles and we want to show different size of fonts according tot he resolution and screen density of mobile screen resolution is provide by J2ME but screen density is not provided is there any way to calculate screen density using WURLF, Or any other third party api or JSR.

    See RAS samples [here|https://wiki.sdn.sap.com/wiki/display/BOBJ/NETRASSDK+Samples]. Look for "NET-CS2003_RAS-Managed_BE115_Add_Image" or "NET-VB2003_RAS-Managed_BE115_Add_Image-From-File".
    Ludek

  • How to show different value, other than whatever from database in a Field

    I have a repeatating frame (corresponding to one query).
    there are 6 fields (columns) in th RF.
    Now say in one of the column the database values are like 1,2,3,4 etc..
    I want to show 'ASSIGNED' corresponding to value 1, INPROGRESS corresponding to value 2 etc..
    Could you please tell me how can I do that?
    Regards

    Hi,
    You can create a formula column in your query and try below code. The formula column should have char as return data type
    IF :column = 1 then
       return 'ASSIGNED';
    ELSIF :column = 2 then  
       return 'IN PROGRESS';
    ELSIF :column = 3 then  
       return 'VALUE3';
    ELSIF :column = 4 then  
       return 'VALUE4';
    ELSE
       return 'VALUE5';
    END IF;Regards
    Manoj
    Edited by: ManojP on Jul 19, 2010 7:26 AM

  • Two alias in Mail: how to show different "from" names?

    I've been reading various threads about aliases in mail, but none have exactly described my situation. What I want to be able to do is set up aliases in my one account and have the mail shown as "from" a different name depending on which alias I've used.
    Here's my current set-up:
    Account Type: POP
    Description: POP account
    Email address: [email protected], [email protected]
    Full Name: myname & mywifesname
    Incoming mail server: pop.domain.com
    username: xxxxx
    password: xxxxx
    outgoing mail server: smtp.domain.com
    So, we can each send email "from" our own email address, but they're all marked as from "myname & mywifes name". How do I change it so if I select "[email protected]" the mail is shown as simply from "myname" and vice versa.
    I understand from reading other threads that the one thing I can't do is set up a separate account for each, as they will both have the same incoming server and username. (Which was exactly what I could do back in the dark ages of Outlook Express.)

    Unless you really just absolutely want to have your sent emails say they're from "Trevor C" or from "Trevor C's Spouse", you could just delete the full name entry from that account in Mail's Preferences (i.e., set full name field to null), and then any sent messages' "from" address will simply appear as being from [email protected] or from [email protected], depending on which "account" (alias) you selected in the "Account" pull-down menu. This would be, I think, the easiest patch for you to implement.
    People who get email from me get mail from "[email protected]" and not from "J.V." Personally, I hate the full name crap and wish there were a way to display the "from" field in my inbound message viewer pane in email address format, rather than full name format. But that's just me.
    (if you find that this solves your problem, or is actually helpful towards arriving at a solution to your problem, please consider clicking on either the "helpful" or "solved" buttons in the header of my post)

  • How To Show Different Artwork For CD With Same Name?

    In 2002, Chris Botti released a holiday CD named December. In 2006 he also released another CD named December with the only difference being track 2 (Ave Maria) & track 7 (I Really Don't Want Much For Christmas which are not included on the 2002 release. These are not additional tracks but replace 2 songs from the original 2002 release. The album art is different for both CDs. So, how can I show these two CDs with the same name and same artist but with different artwork in Cover Flow mode? Help!
    iMac G5 1.8 Ghz iMac 1.8 GHz G5 17" Mac OS X (10.4.8) 1.5 GB RAM   Mac OS X (10.4.8)  

    If you store Album artwork the way i described using Command I (get info) - then the artwork is actually EMBEDDED in each song and is carried with that song wherever it goes.. and in this case it doesnt matter if u had 3 copies of the same album - all identical. You could even save a diff image for each tarck if u wanted.
    If there is no artwork embedded, then coverflow places the image in a separate folder that is only referenced by iTunes for the whole CD.
    You also might want to turn off coverlfow and continue doing what u had been doing in the past - add you won.
    I also think i know what may be happening. You say they are identical except for track 2 - But problem is - I don't think iTunes can handle 2 identical CD's from the same artist.
    Here's an experiment:
    Goto any of the songs.... right-click and select "Show in Finder" the Finder will open and show you the song file and its location. Do you see one album once or 1 album twice?
    If you see 2 of everything, i would recommend the following:
    Rename the first album "December (2002)" and the second "December (2006)" then iTunes will definately separate them out.

  • How to show different templates in one column

    Hello friends,
    I've a data like this one:
    var aData = [
         {name: "Dente", company: "http://www.sap.com"},
         {name: "Friese",  company: "Google"},
         {name: "Mann", company: "http://www.sap.com"},
         {name: "Schutt", company: "SAP"}
    and want to be showed in the table :
         if the 'company' begin with "http" , it should be a link,
         else, shows as a text
    How to do this ?
    Could you help me ?
    Thank you
    Here is a short demo can run in https://openui5.hana.ondemand.com/#test-resources/sap/ui/table/demokit/Table.html 
    but is not completed.
    Demo for test:
    var aData = [ 
         {name: "Dente", company: "http://www.sap.com"},
         {name: "Friese",  company: "Google"},
         {name: "Mann", company: "http://www.sap.com"},
         {name: "Schutt", company: "SAP"}
    //Create an instance of the table control
    var oTable2 = new sap.ui.table.Table({
         title: "Table with fixed columns Example",
         visibleRowCount: 7,
         firstVisibleRow: 3,
         selectionMode: sap.ui.table.SelectionMode.Single,
         navigationMode: sap.ui.table.NavigationMode.Paginator,
         fixedColumnCount: 2
    //Define the columns and the control templates to be used
    oTable2.addColumn(new sap.ui.table.Column({
         label: new sap.ui.commons.Label({text: "Name"}),
         template: new sap.ui.commons.TextField().bindProperty("value", "name"),
         sortProperty: "name",
         filterProperty: "name",
         width: "200px"
    oTable2.addColumn(new sap.ui.table.Column({
         label: new sap.ui.commons.Label({text: "Company"}),
         template: new sap.ui.commons.Link().bindProperty("text", "company").bindProperty("href", "company"),
         sortProperty: "linkText",
         filterProperty: "linkText",
         width: "400px"
    //Create a model and bind the table rows to this model
    var oModel2 = new sap.ui.model.json.JSONModel();
    oModel2.setData({modelData: aData});
    oTable2.setModel(oModel2);
    oTable2.bindRows("/modelData");
    //Initially sort the table
    oTable2.sort(oTable2.getColumns()[0]);
    //Bring the table onto the UI
    oTable2.placeAt("sample2");

    HI Sihao
    will this work?
    Example
    Thanks
    -D

  • How to show different JTable without flickering JFrame?

    I write a simple application with 2 different tables. if user clicks "1" button, the frame will display table 1. else frame display table2. at the moment the code is like:
         JPanel panel1 = new JPanel();     
         ......//make the panel1 contains 2 buttons
         JPanel panel2 = new JPanel();
          ......//make the panel2 contains one table
         JFrame frame = new JFrame();     
         frame.getContentPane().add(panel1,BorderLayout.NORTH);
         frame.getContentPane().add(panel2,BorderLayout.CENTER);
         frame.setSize(700,500); frame.setLocatio(50,25);
         frame.setVisible(true);in ActionPerformed() method, the code is like:
          if (e.getActionCommand().equals("1")) {
              panel2 = new JPanel();
               ......//make the panel contains table1    
              frame.setVisible(false);
              frame.getContentPane().add(panel2, BorderLayout.CENTER);
              frame.setSize(700,500); frame.setLocatio(50,25);
              frame.setVisible(true);
           } else {  
               ...//do same thing with table2
           }there are 2 problems:
    1. every time the frame will flush once if user clicks one button. how to make the frame only change the panel which contains new table but not the button panel?
    2. about size: the user may resize the frame by draging one border of the frame. but the new frame always gets a fixed size. how to make the frame get the size the user adjusted?
    Maybe solve the first problem can automatically finish the second problem. but I don't know how to do.
    Thanks for any help.

    I post the same question twice yesterday but receive no answer. I think it should be straight-forward if you know. Is it really that difficult? I need help!
    Thanks.

  • How to show different recorded audio channels in timeline

    I've recorded an interview with two microphones (one was really bad, so I only want to use the other recorded microphone). I imported the clip from the tape camera into FCP X. Now in FCP X on the timeline I only see one audio track when I seperate it from the video. The two microphones seems to be 'mixed'. This was different in FCP 7 where you see both audio channels seperated.
    How do I manage to seperate the 2 audio channels into 2 channels. I'v troed with Channel Configuration via Audio Inspector but I do not understand it.
    Thanks, Pim

    Select the clip in the timeline and in the audio tab in the inspector in the channels seection switch to dual mono. You can switch off a track here if you wish.

  • Don't know how to show different scene graph

    I need your help.
    That's what i want to do :
    I have two scenegraph which need to be in a same virtual universe (sharedGroup).
    I want to show one scenegraph in a Canvas3D and the other scenegraph in another Canvas3D.
    when i try to do something, both scenegraphs appairs in both Canvas3D.
    Please helpe me !!!

    So are you saying that there is not a little picture of the album on the left side of the name of the song?
    If it is not there then maybe you don't actually have the album art.
    If you want album art for your songs then I suggest using the program which is a widget.
    Here's the link if you want to take a look at what I am talking about:
    http://www.apple.com/downloads/dashboard/music/amazonalbumart.html
    You just type in the name of the album and then it will show up and then you just click apply to iTunes.
    Hope this helps!
    The reward system helps to increase community participation. When a community member gives you (or another member) a reward for providing helpful advice or a solution to their question, your accumulated points will increase your status level within the community.
    Members may reward you with 5 points if they deem that your reply is helpful and 10 points if you post a solution to their issue. Likewise, when you mark a reply as Helpful or Solved in your own created topic, you will be awarding the respondent with the same point values.
    Macbook   Mac OS X (10.4.8)   MacBook

  • In print preview of PO shows Different VAT percentage

    Dear Experts
    In PO print preview VAT amount one time shows 14%, other time it shows 19%, some other time it shows 28%.  But actual percentage is 14%. How it shows different time different values.
    Please reply
    Regards
    Karan

    Hi,
    Might be you have selected Plant/Vendor/Material combination in key combination of FV11.If this is the case then you get the percentage which you maintained for that combination in FV11.check it out for all your combination is FV12.
    Thanks

Maybe you are looking for

  • Column Masking in GUI _UPLOAD

    Hi All, I have to donwload an internal table with header data using column masking. But GUI_DOWNLOAD is downloading data for all the columns. I use one other alternate approach, call GUI_DOWNLOAD function two times, one for Header Data and another fo

  • Photoshop album SE and catalogs

    How can I save or back up catalogs I've made with PSE. What I want to know... how can I restore catalogs after reinstalling windows.

  • Customize OM Infotypes

    Hi, I would like to know what are the following infotypes: 9101 grade Indication 9102 broad band(BB) indicators Regards Thuthu

  • Indesign Booklet printing

    I've been putting together my portfolio using indesign, I have been doing it setup on landscape A2 pages. When I come to print it it is cheaper at uni to print off two pages on one A1 sheet and trim it myself than print each onto a separate A2 sheet

  • Workflow Questions - Premiere on Mac - for FLV file

    Hi. I want to add subtitles to an FLV file using Premiere Pro. I'm working on a Mac. I know that I can't use the FLV so I would have to convert the FLV to an intermediate format first. Then Import that into Premiere, add the subtitles, render and con