How to set background of jtable in no data?

How to set background of jtable in no data?
I use table.setBackground(Color.black) but no successful
Please help me. thanks very much

maybe, you don't understand me.
I have below jtable:
============================
I column1 name l column2 name I
============================
l data l data l
============================
l data l data l
============================
XXX
============================
I wrote:
table.setBackground(Color.black) then only data area has black colour, but XXX area hasn't black colour.
How to XXX area also has black colour?
help me, thanks very much.

Similar Messages

  • How to set background color in row of JTable ?

    i am new in java please tell me about How to set background color in row of JTable ? please example code. Thnak you.

    Here is an example: http://www.javaworld.com/javaworld/javaqa/2001-09/03-qa-0928-jtable.html
    For more info on how to use tables read the swing tutorial: http://java.sun.com/docs/books/tutorial/uiswing/components/table.html
    ICE

  • How to set background color in af:inputText in an af:table

    Hi,
    how to set background color in af:inputText in an af:table depending on the value of af:inputText.
    For example, how to set background red if the af:inpuText is empty
    Thanks

    Hello Pavo,
    it's also possible to take the code from ebitar and use the expression within styleClass instead of inlineStyle.
    E.g. you can define a custom style "StyleClassEmptyText" in your skin and set this styleclass if af:inputtext is empty.
    By using style classes you can have the same style in the whole application and you are able to change this style on a single point(in the styleclass) for the whole application.
    br
    Peter

  • How to set background color for selected days in DateChooser

    How to set background color for selected days. I created
    checkbox for each day [Son,Mon,Tue,Wed,Thu,Fri,Sat] and a
    DateChooser, I want to change the background color for the selected
    day when i click on a button after selecting the desired checkboxs
    [ monthly wise/yearly wise]
    Thanks in advance

    There is no button involved in the following code, but it may
    be of use to you:
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    creationComplete="init()">
    <mx:Script>
    <![CDATA[
    private var origColor:uint;
    private function init():void {
    origColor = dc.getStyle("selectionColor");
    public function setBackGrdColors(newColor:uint):void {
    dc.setStyle("selectionColor", origColor);
    if(dc.selectedDate){
    var dayOfWeek:Number = dc.selectedDate.day;
    else{
    return;
    switch(dayOfWeek) {
    case 0:
    if(sun.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 1:
    if(mon.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 2:
    if(tue.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 3:
    if(wed.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 4:
    if(thu.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 5:
    if(fri.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 6:
    if(sat.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    default:
    break;
    ]]>
    </mx:Script>
    <mx:VBox horizontalAlign="center" verticalGap="20">
    <mx:DateChooser id="dc" textAlign="left"
    change="setBackGrdColors(cellColor.selectedColor)"/>
    <mx:HBox width="100%" horizontalAlign="center">
    <mx:CheckBox id="sun" label="Sun"/>
    <mx:CheckBox id="mon" label="Mon"/>
    <mx:CheckBox id="tue" label="Tue"/>
    <mx:CheckBox id="wed" label="Wed"/>
    </mx:HBox>
    <mx:HBox width="100%" horizontalAlign="center">
    <mx:CheckBox id="thu" label="Thu"/>
    <mx:CheckBox id="fri" label="Fri"/>
    <mx:CheckBox id="sat" label="Sat"/>
    </mx:HBox>
    <mx:HBox width="300" horizontalAlign="center">
    <mx:Label text="Background Color" />
    <mx:ColorPicker id="cellColor"
    selectedColor="#FF00FF"/>
    </mx:HBox>
    </mx:VBox>
    </mx:Application>

  • Flex 4 Mdi canvass, how to set background image..?

    Hi.,
         Now i try to use mdi canvass  background image,how to set  background image in mdi canvass in flex 4..
    With Regards
    LinFlex-

    In the past flex 3 version, there is an attribute call <flexlib:MDICanvas  backgroundImage="@Embed(source='/imgFolder/imgFile.png')/>
    to set it. However it has problem in Flex 4 because of 'halo' and 'spark' theme library changed.
    The following is my post that still haven't found the answer.
    Dear all,
    We  have a project that doing migration from flex 3 to flex 4. We use  flexlib the latest version of
    flexlib - 2.5 - flex4.zip.
    However we  confronted problems that several of attributes that flex 4 doesn't  support:
    Constraints are listed as follows:
    1) <flexlib:MDICanvas  backgroundImage="@Embed(source='/imgFolder/imgFile.png')/>
    2)  <flexlib:MDICanvas backgroundSize="auto"/>
    3)  <mx:ApplicationControlBar barColor="#000000">
    original error message:
    ====================================================
    Description     Resource    Path    Location    Type
    The style 'backgroundImage' is  only supported by type 'flexlib.mdi.containers.MDICanvas' with the  theme(s) 'halo'.    MainView.mxml     /osss/flex_src/hk/gov/labour/osss/view    line 242    Flex Problem
    Description    Resource    Path     Location    Type
    The style 'backgroundSize' is only supported by type  'flexlib.mdi.containers.MDICanvas' with the theme(s) 'halo'.     MainView.mxml    /osss/flex_src/hk/gov/labour/osss/view    line 242     Flex Problem
    Description     Resource    Path    Location    Type
    The style 'barColor' is only  supported by type 'mx.containers.ApplicationControlBar' with the  theme(s) 'halo'.    MainView.mxml     /osss/flex_src/hk/gov/labour/osss/view    line 227    Flex Problem
    Regards,
    Man  Pak Hong, Dave
    manpakhong
    [email protected]

  • How to set height of JTable Header ?

    How to set height of JTable Header and set the text to another size ?

    You can set the font of the header as you can for any component. The font will dictate the preferred height of the header. If you don't like the preferred height, you can set that as well.
    // add table to a scroll pane or the header will not appear
    JTable table = new JTable(...);
    container.add(new JScrollPane(table));
    // get a reference to the header, set the font
    JTableHeader header = table.getTableHeader();
    header.setFont(new Font(...));
    // set the preferred height of the header to 50 pixels.
    // the width is ignored by the scroll pane.
    header.setPreferredSize(new Dimension(1, 50));Mitch Goldstein
    Author, Hardcore JFC (Cambridge Univ Press)
    [email protected]

  • How to set background as white colour for Bitmap images in sapscripts?

    Hi,
    Can anyone let me know that How to set background as white colour for Bitmap images in sapscripts?Actually,I am getting grey as background as defualt for my Bitmap images.
    Sorry,in my previous question,I posted viceversa.I am mistaken.
    Thanks,
    Balaji

    Hi,
    The problem can be solved by changing the way you save the original image.
    Take a look at this thread which explains;
    Problem with logo
    Regards,
    Nick

  • How to set background ChoiceBox item color to ChoiceBox with css?

    How to set background ChoiceBox item color to ChoiceBox with css?
    I need to change items list backgound color.
    I tried with following code, but it doesnt helps:
    .choice-box .context-menu {
      -fx-backgound-color: red;
    .choice-box .menu-item{
      -fx-background-color: red;

    In Java 8, either of your selectors should work.
    In Java 7 (JavaFX 2.2), you need the following workaround:
    #choice-box-menu-item {
         -fx-background-color: red ;

  • How to set field to blank if the data is # or unassigned

    hi experts,
    how to set field to blank if the data is # or unassigned?
    thx

    Hi
    add the following macro to your workbook (template workbook):
    Sub SAPBexonrefresh(qstring As String, resultArea As Range)
        For Each c In resultArea
            If LCase(c.Value) = "not assigned" Then c.Value = ""
           Next
    End Sub

  • How to set the POV in WebAnalysis when data source is HFM?

    Hi Every one..
    Could any one tell how to set pov in web analysis when data base is HFM. And hoe to make the report Dynamicall (Current Pov Member like in FR). for this if use Essbase Ican get it it easiliy by using Subtitutional variable but is ti possible fo rHFM.
    Thnaks in advance
    Rao

    yeas agree with sanakar,
    this field which shankar is talking about must be entry date (if u delta timestamp is date, u will also have to mention this table field name in definition of delta), this means that this field will catch last change to the record, so that it will be delta enabled based on the latest change date. This is very important becuase if u use date like posting date to the delta then back dated posting will not captured in to the delta, as delta for this back date is already been done.
    Hope u understand this.

  • How to set background image in Dynamic Shell Layout

    Experts,
    Using dynamic shell layout, how can we create a skin like this http://www.2shared.com/photo/OqXfb5jq/layoutissue.html
    Issues :
    1)Need to set the background to the page - How to set it in dynamic shell layout.
    2)Panel box color to be changed
    please advice
    thnks
    jdev 11.1.2.1

    Color goes UNDER the background image. Just set it.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "StarPilot06" <[email protected]> wrote in
    message
    news:eqqve6$341$[email protected]..
    >I am trying somethign that seems tricky to me...
    >
    > The image I am using I faded to a solid color on the
    bottom half. I set
    > the
    > background image to to left and NO REPEAT but when the
    cell grows with
    > content
    > and it stretched beyond the image it goes blank
    underneath. How do I set
    > a
    > background color without going over the background
    image?
    >
    > I need them both to be background because I want to use
    text over both.
    >
    > Any ideaS?
    >

  • How to set background color in PL/SQL

    Hi,
    I have tried to set background color in SQL Query. When I execute in Report Region, I am not getting the background color.
    SELECT first query
    UNION 
    SELECT '   || v_sel_organization_id  || ' organization_id  FROM DUAL) org , hr_all_organization_units haou                          WHERE positions_set.position_id = allocations_set.position_id(+)              AND org.organization_id = positions_set.organization_id AND positions_set.position_id = encumbrance_set.enc_position_id(+)              AND positions_set.position_id = payclass_set.position_id(+)  AND org.organization_id = haou.organization_id AND TRUNC (SYSDATE) BETWEEN haou.date_from AND NVL (haou.date_to, TRUNC (SYSDATE))      AND (NVL (allocations_set.allocations, 0) + NVL (encumbrance_set.enc_count, 0) + NVL (payclass_set.pay_count, 0)) != 0  union  select  null , '' ''  ,'' '',''<SPAN STYLE="background-color: red;">Total</span>'' ,''' || v_sum_alloc ||''','|| v_sum_vac ||','''||  v_sum_encum ||''',''' || v_sum_pay ||''' ,null,null,null,null,2 from dual' ; Can anyone help me to resolve this issue.
    Regards
    Balaji S
    Edited by: Balaji Subramaniam on Jan 19, 2010 5:53 PM
    Edited by: Balaji Subramaniam on Jan 19, 2010 5:53 PM
    Edited by: Balaji Subramaniam on Jan 19, 2010 6:46 PM
    Edited by: Balaji Subramaniam on Jan 19, 2010 6:48 PM

    Hi
    A couple of things...
    Thats SQL - not PL/SQL
    That is not a valid SQL statement, I'm surprised its not giving an error. Please post the exact region source.
    When posting code on the forum, put {noformat}{noformat} (with the curly brackets and the word code in lowercase) above and below your code like this...
    {noformat}{noformat}
    SELECT *
    FROM emp
    {noformat}{noformat}
    It will then appear like this... SELECT *
    FROM emp
    Cheers
    Ben                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to set background color in JTF GRID

    Is it possible to set background color in JTF GRID ?

    Hello Pavo,
    it's also possible to take the code from ebitar and use the expression within styleClass instead of inlineStyle.
    E.g. you can define a custom style "StyleClassEmptyText" in your skin and set this styleclass if af:inputtext is empty.
    By using style classes you can have the same style in the whole application and you are able to change this style on a single point(in the styleclass) for the whole application.
    br
    Peter

  • Flex4 How to set background image in Vgroup..?

    Hi.,
            I have using v flex 4 vgroup to set background image., but image was not display.. any change my code.,
    <fx:Style>
          .backgroundImage
                color:#808080;
                fontWeight:bold;
                fontSize:18;
                fontStyle:italic;
                contentBackgroundColor : #FFFFFF ;
                backgroundImage:Embed("assets/Green Apple.jpeg");
    </fx:Style>
    <s:VGroup paddingBottom="10" width="100%"  height="600" paddingTop="10"  styleName="backgroundImage">
        <s:Label text="hai hai hai">
             </s:Label>
           </s:VGroup>
    any solution to solve this....
    With Regards.,
    LinFlex-

    @Peter
    Yes! This works well now. Now I can get repeating background images directly in the code as well as in my CSS style sheets.  This looks good and helps me a lot as there are lots of occasions for me using this. I've gotten used to having repeating image backgrounds in HTML and missed that in Flex 3. This feature alone makes moving to Flex 4 worthwhile.
    This works fine for me:
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx">
      <!--make a background for the whole page  -->
        <s:BorderContainer width="100%" height="100%"
             backgroundImage="@Embed('images/bkg/grey_grid.gif')"
             backgroundImageFillMode="repeat" >
      <!--make an inner area with a graphic background  -->
            <s:BitmapImage id="legalPad"
                  source="@Embed('images/bkg/legalPad.gif')"
                  fillMode="repeat"
                  left="40" top="100"
                  width="825" height="200" />
        </s:BorderContainer>
    </s:Application>
    Here are the images I used:
    grey_grid.gif
    legalPad.gif

  • How to set  'Background Daemon URL' IN CONFIGURATION TAB ?

    Hi All,
    While running background job shuduling, i am getting following error :
    <b>PLEASE SET 'Background Daemon URL' IN CONFIGURATION TAB.</b>
    I have the url, but where to set it in configuration tab ?
    Regards,
    Anubha

    Christian,
    This URL http://<servername>:port/webdynpro/dispatcher/virsa/ccappcomp/BgJobStart?debug=1 allows you to view the entries in a given table. You can not insert information here, as you've already noticed. You will need to get your database admin involved. They will need to make these entries for you directly at the db level. Once the db has entered the required values you will then be able to validate that the values are there by pointing to this URL and checking table virsa_cc_config.
    Hope this helps
    Edit: Updated to the URL in this message to reflect the correct one.
    Message was edited by:
            Michael Penn

Maybe you are looking for

  • PDF/A creation in Mac OS X. Is this impossible?

    Hi everybody, I need to generate PDF/A files (http://en.wikipedia.org/wiki/PDF/A) in 10.4 or 10.5 but I can't figure out how to do it! The best way would be to have a virtual PDF printer able to create this kind of documents but I can't find anything

  • Inner Class Question

    My question pertains to the code at the bottom of this post. I don't understand why the compiler doesn't give an error for the line below. Why would it let you refer to something inside the class (in this case I'm referring to ClassWithInnerClass.MyI

  • Audio dropout, movie sync, transition problems IDVD9

    I created a 55 minute DVD slideshow. Looks great on computer, but when I burn it the following errors occur: Audio drops out for about 5 seconds intermittently Placed two avi movies. Didn't duck audio, but movie audio starts playing before clip airs

  • How to compute group_number efficiently?

    How to compute a group-id efficiently in SQL? I have a table with 2 billion rows and need to compute a group-id for each row. As a simplified example, consider the following table. Year     Value     Group 2000     1     1 2000     2     1 2000     3

  • How to Transport LSMW to development server to Prodution server

    Hi all, I would like to know how we transport LSMW(project, sub-project, Object) from development server to Production server. Thanks Vipin Nagpal