How to resize Labels size based on the column margin changes in JTable??

I have a constructed JTable with 4 columns. Accordingly, I added 4 JLabels for each column. JTable and JLabels are attached to a scrollpane. That in turn, attached to a JFrame.
What I need is, at the runtime, when I change the column margins of a column in JTable, accordingly, the size/margins of the Labels should change..
I am extending AbstractTableModel in order to populate the data in the table, as I should have a checkbox in the constructed JTable.
Please, help me out in finding a solution for this...

Hi pritam,
The “maintain proportions of window for different monitor
resolutions” property will maintain the proportional size of the front panel
(its x and y sizes) when opened in a different resolution. The front panel
objects will not be resized and will appear larger (and may not fit inside the
front panel) when saved in a higher resolution, and moved to a lower
resolution. You can use the “Keep window proportions” property to achieve the
same results.
To have both the front panel dimensions and front panel
controls scale, you need to have both the above property and the “scale all
objects on front panel as the window resizes” selected. The labels will not be
resized by this.
I tried using both properties on two monitors and noticed
that the change does not occur when the resolutions between the monitors are
different. I had to lower both monitors’ resolution to see the change work
properly.
Please post back if you have any questions. Have a great day!
Ryan D.
District Sales Manager for Boston & Northern New England
National Instruments

Similar Messages

  • How to add pop up menu on the column name of a jtable

    hi all,
    i am naive to swing .
    i want to know that how can i open a pop up menu on the right click of the column of a jtable build in frame.i mean to say i on th eright click on the header of table which has column names.

    [url http://java.sun.com/docs/books/tutorial/uiswing/components/menu.html#popup]How to Use Popup Menus.

  • How to create a record based on the name of a file in the file-system?

    Hi,
    With a lot of pictures I want to have a database to gather some information about these pictures.
    First question is how to generate a record based on a file in the file system?
    e.g. the pictures are "c:\fotos\2009\01\disc_001.jpg" to "c:\foto\2009\01\dis_98.jpg" .
    now i want to create records with as one of the attributes the name of the picture (not the picture itself). how to create these records (based on the information of the file-ssytem). i.e. the number of records should be the same as the number of pictures.
    any suggestions?
    any reaction will be appreciated.
    Leo

    Link to Create directory
    http://www.adp-gmbh.ch/ora/sql/create_directory.html
    You can create a list of files in the directory and read the list files from that directory.
    [UTL_FILE Documentation |http://download.oracle.com/docs/cd/B14117_01/appdev.101/b10802/u_file.htm#996728]
    [Solution using Java|http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:439619916584]
    SS

  • How to invalidate a session based on the session id

    How to invalidate a session based on the session id

    You have to write your own support for this.
    It used to be in the API, but was deprecated as a security hole.
    The best way to do it is implement a session listener (javax.servlet.http.HttpSessionListener) which notifies you when sessions are created/destroyed.
    You can then keep a map of sessions in your own code, indexed by session Id, and access any/all of them to invalidate as you choose.

  • How to handle vendor discounts based on the qty / value procured.

    Hello
           How to handle vendor discounts based on the qty / value procured.
    a.       Scenario: you have entered into a contract with vendor that you will buy goods worth Rs 10000/- and if you buy goods worth more than 100000 the vendor says he will give a discount of Rs 5000/- @ the end of the year.  
    i)                    How to handle this sceneriou2019s with SAu2019s
    ii)                   What does STD SAP offer.
    Regards
    Sapman man

    Hi,
    For the discucount condition type, you have to maintain scales.
    Take Condition type -  Discount Value ( RB00)
    Discount Value ( RB00) - Means Fixed discount. For this condition type, you have to maintain Scale basis as Value scale 'B' in the condition type customization.
    Transcation : M/06
    Select your condition type RB00 and click on the details icon.
    In the Scales block, you have to maintain and save.Calculation type = Fixed amount
    Scale basis = Value scale 'B'
    For this condition type, you have to maintain scales in the inforecord.
    Transcation : ME12
    Select this condition type, click on the Scales icon. There you have to maintain like
    From : 10,0000            Rate: 5000.
    It means, if the document value is reached 10,0000 then discount is 5000rs. If the value islessthen the 10,0000 then no discount.
    Regards
    KRK

  • To equall the size of all the columns

    Hi,
    i want to equall the size of all the columns. How can it be done??

    If I am getting it properly then you want nto fix the column size but not the data size..correct?.
    If it is column size then you can override the column name my clickin on the -->Column Prperties -->Column Format -->Column Heading and give the name with your specified width
    (Like Veeresh --which is 7 in width)
    Or
    Click on Edit formula -->Click on Custom Heading ->Type your own column name of your own width.
    If it is data size then
    -->Column properties -->Data Format -->Override Default Data format -->Treat number as number -- specify the limit.
    Do the same for all columns,by doing so report you will have the data in fixed width.
    Marks helpfull or correct if it answres
    Regards,
    Veeresh Rayan

  • How to show/hide total based on selected column in column selector

    Hello,
    Is there a way to show/hide the total based on what column is selected in the column selector? Or alternatively to hide the total based on the column selected? I'm using OBIEE 10g.
    Basically, I have a pivot table with a handful of row variables and one measure. Then I allow the user to select the column variable. The default is to have nothing, which I have achieved using the hidden/dummy column trick (Re: How to add new columns by using Multiselect However, if my pivot table is set to have a total, I now get 2 columns that are the same. When the user selects any other choice (e.g. gender), I would want to see Male, Female and the total. Something like this:
    Default:
    Count
    East 10
    West 20
    Total 30
    Gender:
    Male Female Total
    Count Count Count
    East 6 4 10
    West 14 6 20
    Total 20 10 30
    Any thoughts?
    Thanks!

    I recommend using view selector instead of column selector

  • Images on sightseeing.html won't align with the column margins.

    All six parts of the Bayside Beat tutorial were great!!!  The only problem I had was the images on the sightseeing.html page won't align with the column margins. They won't move all the way to the left or right.  In design view they align with the margins correctly, but in Live view mode or when viewed in a browser there is a space between the margin and the images.  The space is constant and doesn't vary with the width of the browser.
    I unzipped the final version of the site to a new folder.   I viewed it in Chrome and in Explorer 11 and the images still won't align with the margins.  I'm using window 8.1 and DW CC6.
    It's not a big deal, because I learned many things from the tutoral, but I still would like to know what I'm doing wrong.
    Thanks for any help.
    Design View
    Live View

    Glad you enjoyed the tutorial videos.
    Just looking at the screenshot of Live view, I would say that the problem is you haven't set the left margin in the floatleft class to zero. The image is wrapped in a <figure> element. Most browsers add a default 40px left margin to <figure>. Setting the margin to zero in a class overrides the default.

  • How to render web items based on the authorisation profile of the user

    Hello,
    Is there any way to render web items based on the authorisation profile of the user. The only way i can think of is:
    - Write ABAP to look up into the security mapping tables.
    - Convert the ABAP report into RFC-Enabled FM. The selection variables will be part of the import/export parameters of FM and table can be used to display the result.
    - Create HTML template using WAD, write Java Script to call the FM and map the import/export parameter. Display the result in Table.
    But i don't know How to use the Java Script to call Function Module (FM) and get back the authorization through parameter.
    Is anyone know about it or is there any other method to do it? I can't find any solution and it is very critical for me.
    Any help is highly appreciated.
    Rajat

    Hi Rajat,
    Do you mean that you want certain users to be able to use only certain web items? I think you can use the libraries for that and assign them to roles:
    http://help.sap.com/saphelp_nw04/helpdata/en/4e/0f813b420ce60ee10000000a114084/content.htm
    Hope this helps...

  • How to create a shape based on the shape of an image

    I want to erase a portion of a mask based on the shape of an image. how can i do this? btw how to create a circle? thx

    Both your questions leave room for imagining what you might really mean, but here's a shot at answering them.
    If you have a mask that you want to erase portions of based on an image... assuming the mask is a simple rectangle you drew with the rectangle tool, change the opacity of the rectangle's fill in the color panel to make it see-thru, place the mask over the image, and using the eraser tool, erase the portions of the mask that you do not intend to retain using the image below it as a guide.
    As for drawing a circle, hover over the rectangle tool and a menu should appear.  Select the oval/ellipse tool.  To draw a circle, hold down the shift key and draw just as you did for the rectangle.  The shift key forces it to retain equal width and height.

  • How to create a report based on the selection of a node of a tree

    Hello,
    I am new to Oracle Apex and I was trying to build a tree and also an interactive report based on the empno column of the emp table.
    I have created a tree based on emp table. Now I want to display records of the employee selected in the tree.
    Here is the tree query:
    select case when connect_by_isleaf = 1 then 0
    when level = 1 then 1
    else -1
    end as status,
    level,
    "ENAME" as title,
    null as icon,
    "EMPNO" as value,
    null as tooltip,
    null as link
    from "#OWNER#"."EMP"
    start with "MGR" is null
    connect by prior "EMPNO" = "MGR"
    order siblings by "ENAME"
    Can anyone tell me step by step how to go from here?
    I tried to follow the thread Re: tree question but could not understand much from it.

    The approach for reloading the page and displaying the report is quite simple.
    <li>You start by creating a new page item which would be used to store the selected node ID , eg. P100_SELECTED_NODE (you can make it atext item and change it hidden once everything works as expected)
    <li>Modify the tree query and change the link column in the tree definition SQL query to a link to the same
    for example if your page is 100 , you would make the tree node link to the same page but set the P100SELECTED_NODE with selected node's id_
    This done here
    {message:id=4410987}
    In this case it would be
    'f?p=&APP_ID.:100:'||:APP_SESSION||'::::P100_SELECTED_NODE:'||EMPNO as link Now when you click on a tree node link , it would come back to the same page, but set the P100_SELECTED_NODE with the empno of the clicked node.
    <li> All that is left to do, is changing your Report so that it refers to the new item inorder to filter the records for this employee i.e empno
    SELECT ...
    WHERE empno= :P100_SELECTED_NODE

  • How to open a form based on the the parameter in another Form

    I created a button in a form (FORM1). By clicking this button, I want to open another form (FORM2) based on the a value of one key field in this form(FORM1). Both forms have the same key field.
    So, I wrote the following codes behind the PL/SQL Button Event Handler of the custom event for the button that I created in FORM1.
    v_inventory_num:=p_session.get_value_as_NUMBER(
    p_block_name => "_master_block",
    p_attribute_name => 'A_INVENTORY_NUM',
    p_index => 1
    if v_inventory_num is not null then
    portal30.wwa_app_module.set_target('/pls/portal30/PORTAL.wwa_app_module.link?p_arg_names=_moduleid&p_arg_values=5958032800&p_arg_names=_show_header&p_arg_values=YES&p_arg_names=A_INVENTORY_NUM&p_arg_values='||v_inventory_num,'CALL');
    end if;
    end;
    I could not open the FORM2 by clicking the button on FORM1.
    However,I can open the FORM2 by click the button by using the following code.
    portal30.wwa_app_module.set_target('/pls/portal30/PORTAL30.wwa_app_module.new_instance?p_moduleid=5958032800','CALL');
    How could I pass the parameter in FORM1 into FORM2 and when the FORM2 is opened if has already been queried with the passed parameter?
    Your help would be highly appreciated!
    Jeffrey Wei Ye

    Hi:
    Thank you for reply to my question.
    I have tried your codes and apply them the following the form. However, I always got the following error:
    Error: (WWV-00000)
    No conversion performed for type INTEGER, value . (WWC-49102)
    No conversion performed for type INTEGER, value . (WWC-49102)
    No conversion performed for type INTEGER, value . (WWC-49102)
    No conversion performed for type INTEGER, value . (WWC-49102)
    My codes is:
    declare
    request_no number;
    blk varchar2(30) := 'DEFAULT';
    l_url varchar2(4000);
    begin
    request_no := p_session.get_value_as_NuMBER(
    p_block_name => blk,
    p_attribute_name => 'A_WORK_REQUEST_ID');
    l_url := 'portal30.wwa_app_module.link?p_arg_names=_moduleid&p_arg_values=11880470335&p_arg_names=_sessionid&p_arg_values=&p_arg_names=work_request_id&p_arg_values='||request_no;
    portal30.wwa_app_module.set_target(l_url,'call');
    end;
    then,
    I created another form which has two fields and the dattype of pk is varchar2 and change manually put the pk's p_arg_value into the url.
    e.g.
    l_url:='PORTAL30.wwa_app_module.link?p_arg_names=_moduleid&p_arg_values=9029417810&p_arg_names=WORK_AREA_CD&p_arg_values=APP';
    portal30.wwa_app_module.set_target(l_url,'call');
    However, I still get the error message as below:
    Error: (WWV-00000)
    No conversion performed for type INTEGER, value . (WWC-49102)
    No conversion performed for type INTEGER, value . (WWC-49102)
    No conversion performed for type INTEGER, value . (WWC-49102)
    No conversion performed for type INTEGER, value . (WWC-49102)
    No conversion performed for type INTEGER, value . (WWC-49102)
    Your help would be highly appreciated.
    Wei Ye

  • How to fit to size to show the whole image in image display?

    HI, I am using a control palette to display my video images using image display. However, the size is alway out of proportion. How do i show the whole image in the small box screen size. Basically how to fit to size for the images? 
    Solved!
    Go to Solution.

    This should do the trick:
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • How to search to files based on the metadata of the category in CS

    Hi,
    Can any one tell me how to search the files in the content services based on the metadata of the Category,I know how to search based on the Category using
    public static void attributSearch(String searchString)
    throws FdkException, RemoteException, Exception
    // get the Manager instances
    SearchManager sem = s_WsCon.getSearchManager();
    CategoryManager cat = s_WsCon.getCategoryManager();
    CommonManager cm = s_WsCon.getCommonManager();
    FileManager fm = s_WsCon.getFileManager();
    Item folder = fm.resolvePath("/idc/workspaces/BoardMembersProject", null);
    AttributeRequest[] catAttr =
    WsUtility.newAttributeRequestArray("ProjectCategory");
    // create AttributeRequest to retrieve CATEGORIES attribute
    AttributeRequest[] catClassAttr = WsUtility.newAttributeRequestArray(
    Attributes.CATEGORIES, catAttr);
    // define search options
    NamedValue[] nv = WsUtility.newNamedValueArray(new Object[][] {            
    { Options.SEARCH_VERSION_HISTORY, Boolean.TRUE },
    { Options.RETURN_COUNT, new Integer(100)
    // get search expresiion
    SearchExpression seExp = new SearchExpression();
    // searchString ="ProjectCategory";
    Item[] item = cat.getRequiredCategories(folder.getId(),catClassAttr);
    seExp = new SearchExpression();
    NamedValue[] attributes = item[0].getRequestedAttributes();
    seExp.setOperator(FdkConstants.OPERATOR_HAS_CATEGORY);
    seExp.setRightOperand("["+item[0].getName()+"]");
    // search documents
    NamedValue[] result = sem.search(seExp, nv, null);
    // search result display
    for (int i = 0; i < result.length; i++)
    if (result.getName().equals(Options.SEARCH_RESULTS))
    Item[] resulItem = (Item[]) result[i].getValue();
    WsUtility.log("Kveni",resulItem);
    if (resulItem != null)
    for (int j = 0; j < resulItem.length; j++)
    WsUtility.log("File " +resulItem[j].getName());
    But how do one search Based on the attributes of the category??
    thanks
    kveni

    Download the PM accelerator kit appropriate to your environment, and check out the TestSearch2.java example.
    http://www.oracle.com/technology/products/cs/developer/contentservicesdev/contenservicesdevkit.html
    Essentially you need to lookup the internal names of your category attributes, as well as have the internal name of your category class.
    categoryClassName = ...; // e.g. AHC_XXX
    attribute1name = ....; // e.g. CUSTOM_MYBOOLATTR
    you then create a normal search expression such as
    String attribute1Operand = "[" + categoryClassName + FdkConstants.SEPARATOR + attribute1name + "]";
    SearchExpression expr1 = new SearchExpression();
    expr1.setOperator(FdkConstants.OPERATOR_EQUAL);
    expr1.setLeftOperand(attribute1Operand);
    expr1.setRightOperand(Boolean.TRUE);
    Matt.

  • 10G-form: How to open 2nd form based on the queried result in 1st form?

    Form1: text_item1, search_result_text_item11, search_button, go_button
    Form2: text_item2
    When I press search_button on Form1, I am able to get the result in search_result_text_item11 based on the query defined in the search_button TRIGGER.
    So I've value in search_result_text_item11.
    Now I want to copy search_result_text_item11 value of Form1 to text_item2 value in Form2 when I click go_button;
    How do I do it?
    Thanks.
    Gaurav

    i can think of two ways,
    one is pass it as parameter, when you are calling the new form
    or
    in form1, in the when-button-pressed trigger of your go_button, copy the value of search_result_text_item11 to a global variable...
    in form2, in when-new-form instance, assign the value of the global variable to text_item2
    just be sure to erase the global variable immediately after you assigned to text_item2. also, you may want to put, default_value before assigning the global variable to the text_item2, this is to ensure that you will not have error when the global variable is not created.

Maybe you are looking for