How to put JTable checkbox on the top of its cell

my JTable only had 2 columns, one data type is boolean, display as checkbox, one data type is String,cell Renderer is JTextPane which data had large size ,and each row had different height depended on data size.
now the checkbox is displayed at the centre of each row, i hope it can be displayed on the top of this row, how i can set it. please help guide.
Many Thanks
Susan

Camickr,you are excellant, it's resolved as you said as following:
private JTable tblMain = new JTable(){
        public Component prepareRenderer(
            TableCellRenderer renderer, int row, int column) {
            Component c = super.prepareRenderer(renderer, row, column);
            if (c instanceof JCheckBox)
                ( (JCheckBox) c).setVerticalAlignment(JCheckBox.TOP);
            return c;
        public Component prepareEditor(
            TableCellEditor editor, int row, int column) {
            Component c = super.prepareEditor(editor, row, column);
            if (c instanceof JCheckBox){
                ( (JCheckBox) c).setVerticalAlignment(JCheckBox.TOP);
                c.setBackground(Color.white);
            return c;
    };

Similar Messages

  • How to put a JFrame on the top of all other applications

    when some message is received, I want to put an existing JFrame on the top of all other applications. So that the user knows that some message has arrived.
    I tried toFront(), but it blinks the JFrame on the taskbar never comes on the top of other application.
    Any ideas.
    Rajesh

    On Windows 98 the toFront() method works, but maybe not exactly how you expected.
    There seems to be a delay of about 20 seconds.
    If your frame has not been active within the last twenty seconds then the frame is displayed when the toFront() is used.
    If the frame has been active within the last 20 seconds then the icon will flash.
    I believe this behaviour is to prevent frames from poping up all the time. Here is a simple program that shows this behaviour:
    import java.awt.*;
    import java.awt.event.*;
    import java.util.Date;
    import javax.swing.*;
    public class FrameToFront
        public static void main(String[] args)
            final JFrame frame = new JFrame();
            frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
            frame.setSize(200, 200);
            frame.setLocationRelativeTo( null );
            frame.setVisible(true);
            int delay = Integer.parseInt(args[0]);
            final Timer timer = new Timer(delay, new ActionListener()
                public void actionPerformed(ActionEvent e)
                    System.out.println(new Date());
                    frame.toFront();
            timer.start();
    }After you start the program click on the dos window to hide the frame. Try the following two cases:
    java FrameToFront 5000
    java FrameToFront 20000

  • When I open a link from another website ForeFox puts a messagge at the top of the new link saying that it has blocked the websiste from transferring me to a new

    When I open a link for another website Firefox opens a new tab but puts a line on the top of the new page saying that Firefox has blocked the website from transferring me to another page.
    I have to press ALLOW before Firefox will open the new page.
    How can I solve this problem.
    Many thanks in advance.

    hello betth007, in order to get effective help, please open a new question at https://support.mozilla.org/en-US/questions/new instead and include a bit more details about your issue (what kind of error message are you getting, etc.). thank you!

  • HOW TO PUT MOVIES BACK IN THE CLOUD ON IPAD

    HOW TO PUT MOVIES BACK IN THE CLOUD ON IPAD

    You can't put films in the cloud yourself, whether they will show in the cloud for redownloading depends upon what country that you are in, if the rights-holder allows redownloading, and if the film remains in your country's store. You can delete a film from your iPad via the Edit button at the top right of the film select ion screen in the Videos app or via Settings > General > Usage > Videos (that should also give you an Edit button top right of the screen or you can swipe/drag across a film form right-to-left) - but the film might not then show in the cloud for redownloading. If you haven't already done so you should connect the iPad to your computer's iTunes and do File > Devices > Transfer Purchases so that you can take your own backup copy of your downloads (apps, ibooks etc could also be removed from the store and not be redownloadable in the future).

  • How to create a title over the top of the left-most column in a cross-tab.

    This is one of those things that seems simple until you try it.
    I'm almost there.  I moved the cross-tab from the report header to the report footer so I can have a page title.  I tried using an overlay but it didn't work for any page past the first.
    I can't seem to figure out how to put a title over the left-most column though.
    Thanks in advance,
    J

    I have used a text box, after you type in the text, select the box, and move it to the front.
    then select the crosstab and move it to the back.

  • HOW TO PUT TWO PANNEL IN THE SAME PAGE

    HI ALL
    I NEED TO KNOW HOW TO PUT TWO PANNEL IN THE SAME PAGE TO FULLY UTILIZE FULL PAGE AREA BECAUSE THE PANNEL WIDTH IS TOO SMALL , SO I WANT TO MAKE THE PAPER CONTAIN TO PANNELS VERTICALLY.
    THANK YOU

    So Barb,
    I like to use multiple desktops and move back and forth between then using gestures. At the moment I have 5 open: Chrome, Firefox, Safari, Photoshop CS 6 and a desktop. I use "gestures" to navigate between them:
    Mac Basics: Multi-Touch gestures - Apple Support
    and I use Mission Control (F3) to move the various desktops around in the order I want them.
    Mac Basics: Mission Control - Apple Support
    So say I'm searching for a photo to open in CS 6, I find it on the open desktop then hit select "open" in CS 6 and go to that folder in the select pane.
    Even right now I'm typing this in Safari and "gesturing" back to Chrome where I did the search about multi touch and mission control. I drag copy the URL there  and gestured back here to paste the URL into this text.
    If you did a lot of photo searches, I set professional clients of mine in Chicago up with dual monitors (In this case you'd have an external monitor on extended desktop.). So all you need to do is just glance over at the second monitor slide your cursor over there open stuff up find your photo and go back to Photoshop and open it up.
    Hope this helps.

  • How to put dead notes on the guitar software instrumet??

    How to put dead notes on the guitar software instrumet??

    a dead note is when you mute the chords, like on the smells like teen spirit riff

  • Could you please tell me how to delete a bookmark on the top of page (it has a space for four bookmarks). Thanks

    Could you please tell me how to delete a bookmark on the top of page (it has a space for four bookmarks). Thanks

    To delete a bookmark from your bookmark toolbar, point at the bookmark with your mouse or trackpad, then right-click on it (press the right-hand button on your mouse or trackpad) and choose "Delete" from the pop-up menu.
    For other ways of deleting bookmarks, see '''[[Deleting Bookmarks]]'''.

  • How to get Drafts Mailbox at the top rather than in ON MY MAC

    My wife is switching from Entourage to Mail and I can't get her set up the same as I have been in Mail for years. At the top of the left panel I have Inbox, Drafts, Sent and Trash, with sub listings for each of my mail accounts, followed by SMART MAILBOXES and ON MY MAC. My wife has the same except for the Drafts and its sub listings. Instead, she has several Drafts Mailboxes (1 for each email account) under ON MY MAC. How do I get Drafts at the top as I have it?

    Then it may be that by some action, some existing Drafts mailboxes were found, and Mail moved them to the On My Mac section.
    Has she yet in Mail composed a message, clicked on Save as Draft before sending, and checked to see if that has been saved in newly created Draft mailbox in the location you expected?
    Ernie

  • How to put a check with the date

    Hi,
    I have created a ztable with 3 fields .
    clientcode(3),
    date,--date geneated
    version--- fileversion
    i need to update this table everytime i execute the data. Every time version shd get incremented when i execute the program.  When i excute the program next day version shd be updated by '1'.
    i wrote the code for version updated i'm not getting the logic how to put a check with the date.
      SELECT *
       FROM zfi_enetflver
       INTO TABLE gt_flver.
      SORT gt_flver DESCENDING.
      CLEAR: gv_dt, v_file.
      CONCATENATE sy-datum6(2) sy-datum4(2) INTO gv_dt.
      READ TABLE gt_flver WITH KEY client_code = gv_clcd.
      IF sy-subrc = 0.
        idx = sy-tabix.
        IF gt_flver-zdate = ' '.
          gt_flver-zdate = sy-datum.
        ENDIF.
        IF gt_flver-version = ' '.
          gt_flver-version = '001'.
          gv_filever = gt_flver-version.
          MODIFY gt_flver INDEX idx TRANSPORTING zdate version.
          MODIFY zfi_enetflver FROM TABLE gt_flver. "TRANSPORTING version.
          CONCATENATE 'E:\' 'ENET\' gv_clcd gv_dt '.' gt_flver-version INTO v_file.
        ELSE.
          gt_flver-version = gt_flver-version + 1.
          gv_filever = gt_flver-version.
          MODIFY gt_flver INDEX idx TRANSPORTING version.
          MODIFY zfi_enetflver FROM TABLE gt_flver .
          CONCATENATE 'E:\' 'ENET\' gv_clcd gv_dt '.' gt_flver-version INTO v_file.
        ENDIF.
      ENDIF.
    clientcode is the key field in ztable do i need to make date field key ??
    please help me with the logic

    You need to implement below logic:
    1. check if field_date = sy-datum. in this case do nothing.
    2. else . move sy-datum to field_date .
    3. modify your internal table with field_date .
    4. populate final table to database table .
    hope you get it.

  • How to give a user just the acess to its order services/affectations ?

    Hello experts,
    Do you know how to give a user just the acess to its order services/affectations ?
    Thanks for your answer,
    Best regards,
    Alexandre Dupont

    For order services, contracts and activities set object CRM_ORD_OP as I said.
    For Ibase use CRM_IBASE but with this one it is not possible to set authorizations only for own ibases. Maybe there is some other object for ibases.
    Also for business partner there is no such authorization object to shown only own partners. You have 2 options. To play with object B_BUPA_GRP but that means you will have to maintain group for each responsible employee. Or you implement logic in badi BADI_CRM_BP_UIU_AUTHORITY.

  • How can I put a div at the TOP of the page with a background color? No white space

    I am attempting to put an orange bar at the very top of a page and one that also stretches across the entire width of the page, no matter the page size.
    With the code below the orange bar appears but there is white space between the top of the browser and the orange bar.
    <div style="background-color:#f79321;height:30;width:auto;"> <p> </p></div>
    How can I get rid of this white space? I tried setting margin and padding to 0px but that did not work.

    I'm still getting the spacing:
    <html>
        <head>
            <style>
                body
                margin: 0;
                padding: 0;
                font-family: Georgia, serif;
                text-align: left;
                font-size: 16px;
                line-height: 1.2;
                word-wrap: break-word;
                text-rendering: optimizeLegibility;/* kerning, pri*/
                h2
                font-family:Arial, sans- serif;
                font-size: 28px;
                color: #fb8700;
                h2 a
                font-family: "bebas-neue",sans-serif;
                font-size: 40px;
                h2 a:visited
                color:#fbb100;/* visited - orange*/
                text-decoration:none;
                h2 a:active
                color:#fbb100;/* selected- orange*/
                text-decoration:none;
                h2 a:hover
                color:#c9c9c9;/* mouseover- light grey*/
                text-decoration:none;
                h4
                font-family: "bebas-neue",sans-serif;
                font-size: 50px;
                color: #fbb100;
                #page-wrap
                width: 960px;
                margin: 0 auto;
                p.topFormat
                font-family: Georgia, serif;
                font-size:16px;
                text-align:center;
                p.footerFormat
                font-family: Georgia, serif;
                font-size:16px;
                text-align:left;
                line-height: 150%;
                a:link {color:#fbb100;text-decoration:none;}      /* unvisited - orange*/
                a:visited {color:#fbb100;text-decoration:none;}  /* visited - orange*/
                a:active {color:#fbb100;text-decoration:none;}  /* selected - orange*/
                a:hover {color:#636363;}  /* mouse over - grey*/
            </style>
            <script type="text/javascript" src="//use.typekit.net/ppq8ria.js"></script>
            <script type="text/javascript">try{Typekit.load();}catch(e){}</script>
        </head>
        <body>
            <div style="background-color: #f79321; height: 31px; width: auto;">
            <p> </p>
            </div>
            <div>

  • How do I get out of "full screen" view. When I put my crusor at the top of the screen I get SOME menus showing, but nothe the "firefox" drop-down where I selected full screed (I was just trying to zoom out, actually)

    I think the question pretty well summed it up. I selected full screen mode from the "firefox" drop-down box at the top left, but once in full screen mode, the drop-down box is not available. How do I get back to the standard view??

    Press the F11 key to toggle into and out of full screen mode.
    Or, move the mouse pointer to the top of the screen and right-click the "+" (new tab) button, or in a blank area of the tab bar, or in a blank area after the address box, and exit full screen mode from the context menu.

  • How to make text start at the top of a page in livecycle 9

    Hi, How can I get the text in a large text field to start at the top left of the field rather than at the center of the field? In addition, may one know how to make text wrap in the form as well?
    Thanks,
    David

    To set the Text alignment properties use "Paragraph" pallet you can make it visible by selecting Window>>Paragraph or Shift+F5
    And to allow text wrapping you need to select "Allow Multiple Lines" checkbox under "Object" pallet and "Field" tab. You can make Object pallet visible by selecting Window>>Object or Shift+F7.
    Good Luck,

  • How to print a value at the top of each page in the detail section of a rpt

    Thanks for helping, I will try to get right to the point.
    I have RTF template. Very simplistic template. I have the Group at the top (there is only 1 per XML file) and several DETAIL lines with like 10 columns.
    The first displayed field is "ACCOUNT_NUMBER". The user wished that if the ACCOUNT NUMBER for line 2 was the same as line 1, that it be suppressed, for example:
    Acct No other other other other
    1234 XX XX XX XX
    YY YY YY YY
    This was not a problem, I was able to accomplish it with the following code:
    <?if:position()=1 or ACCOUNT_NUMBER!=preceding::ACCOUNT_NUMBER[1]?><?ACCOUNT_NUMBER?><?end if?>
    But what happens is that IF THE FIRST line on a page has the same ACCOUNT_NUMBER as the last line on the previous page, the ACCOUNT NUMBER is not displayed.
    What I would like is for the ACCOUNT NUMBER to be displayed anytime we are at the first record on a page, AND anytime it is different from the previous record's value.
    I do not know how many lines per page are possible, because there are other line breaks which exist which put a space between lines when values change too. So I cannot just count how many total lines and divide it by lines per page.
    My thought was that there must be a way I could store a variable called LAST_PAGE, and at the end of each record, copy the current page number to that variable. Then in my ACCOUNT_NUMBER code, I could check if current page is NOT equal to last page along with my other conditions.
    1. Is this the best way to do this? If so, please help, I am new to BI and am having trouble figuring out where to put variables and stuff like that.
    2. If not, how can I do this?
    3. If your recommendation is going to be to group my items by Account Number, I may not have time to redo the report that way. I will happily supply the rtf and xml if that will help you help me.
    Regards:
    Michael Coughlin

    Here ya go. Obviously you can duplicate the G_DETAILS blocks to get enough for 2 pages. I have the data pre-sorted before the output is generated because I had trouble getting the RTF to work if I didn't, just so you know.
    <?xml version="1.0" encoding="UTF-8" ?>
    <!-- Generated by Oracle Reports version 6.0.8.28.0 -->
    <XXDIPICK_RPT>
    <LIST_G_HEADERS>
    <G_HEADERS>
    <SHIP_FROM_ORG_CODE>202</SHIP_FROM_ORG_CODE>
    <LINE_STATUS>Picked</LINE_STATUS>
    <LIST_G_DETAILS>
    <G_DETAILS>
    <SHIP_FROM_ORG_CODE1>202</SHIP_FROM_ORG_CODE1>
    <ACCOUNT_NUMBER>1000</ACCOUNT_NUMBER>
    <DELIVERY_NUMBER>8062</DELIVERY_NUMBER>
    <ORDER_NUMBER>103049</ORDER_NUMBER>
    <CUST_NAME>DIAMOND INNOVATIONS INT SALES - NEWCO</CUST_NAME>
    <DELIVERY_DETAIL_ID>12474</DELIVERY_DETAIL_ID>
    <LINE_NO>1.1</LINE_NO>
    <ITEM_NO>4087401</ITEM_NO>
    <ITEM_DESCRIPTION>HPD M SD-CTO-0 Pot</ITEM_DESCRIPTION>
    <OPEN_FLAG>Y</OPEN_FLAG>
    <CANCELLED_FLAG>N</CANCELLED_FLAG>
    <BOOKED_FLAG>Y</BOOKED_FLAG>
    <ORDERED_QUANTITY>1</ORDERED_QUANTITY>
    <ORDER_QUANTITY_UOM>EA</ORDER_QUANTITY_UOM>
    <SHIPPED_QUANTITY></SHIPPED_QUANTITY>
    <SCHEDULE_SHIP_DATE>2011-01-31T23:59:00+00:00</SCHEDULE_SHIP_DATE>
    <NAME>INTERNAL ORDER - US</NAME>
    <CUST_ACCOUNT_ID>16404</CUST_ACCOUNT_ID>
    <HEADER_ID>6446</HEADER_ID>
    <LINE_ID>7926</LINE_ID>
    <ORG_ID>84</ORG_ID>
    <SHIP_TO_ORG_ID>16050</SHIP_TO_ORG_ID>
    <INVOICE_TO_ORG_ID>16052</INVOICE_TO_ORG_ID>
    <SHIP_SET_ID></SHIP_SET_ID>
    <INVENTORY_ITEM_ID>63927</INVENTORY_ITEM_ID>
    </G_DETAILS>
    <G_DETAILS>
    <SHIP_FROM_ORG_CODE1>202</SHIP_FROM_ORG_CODE1>
    <ACCOUNT_NUMBER>1000</ACCOUNT_NUMBER>
    <DELIVERY_NUMBER>8062</DELIVERY_NUMBER>
    <ORDER_NUMBER>103049</ORDER_NUMBER>
    <CUST_NAME>DIAMOND INNOVATIONS INT SALES - NEWCO</CUST_NAME>
    <DELIVERY_DETAIL_ID>12475</DELIVERY_DETAIL_ID>
    <LINE_NO>2.1</LINE_NO>
    <ITEM_NO>3732307</ITEM_NO>
    <ITEM_DESCRIPTION>NV MBS 2325 Bushing Asm</ITEM_DESCRIPTION>
    <OPEN_FLAG>Y</OPEN_FLAG>
    <CANCELLED_FLAG>N</CANCELLED_FLAG>
    <BOOKED_FLAG>Y</BOOKED_FLAG>
    <ORDERED_QUANTITY>1</ORDERED_QUANTITY>
    <ORDER_QUANTITY_UOM>EA</ORDER_QUANTITY_UOM>
    <SHIPPED_QUANTITY></SHIPPED_QUANTITY>
    <SCHEDULE_SHIP_DATE>2011-01-31T23:59:00+00:00</SCHEDULE_SHIP_DATE>
    <NAME>INTERNAL ORDER - US</NAME>
    <CUST_ACCOUNT_ID>16404</CUST_ACCOUNT_ID>
    <HEADER_ID>6446</HEADER_ID>
    <LINE_ID>7927</LINE_ID>
    <ORG_ID>84</ORG_ID>
    <SHIP_TO_ORG_ID>16050</SHIP_TO_ORG_ID>
    <INVOICE_TO_ORG_ID>16052</INVOICE_TO_ORG_ID>
    <SHIP_SET_ID></SHIP_SET_ID>
    <INVENTORY_ITEM_ID>67865</INVENTORY_ITEM_ID>
    </G_DETAILS>
    <G_DETAILS>
    <SHIP_FROM_ORG_CODE1>202</SHIP_FROM_ORG_CODE1>
    <ACCOUNT_NUMBER>46711</ACCOUNT_NUMBER>
    <DELIVERY_NUMBER></DELIVERY_NUMBER>
    <ORDER_NUMBER>102980</ORDER_NUMBER>
    <CUST_NAME>VAREL EUROPE</CUST_NAME>
    <DELIVERY_DETAIL_ID>12356</DELIVERY_DETAIL_ID>
    <LINE_NO>1.1</LINE_NO>
    <ITEM_NO>11004002</ITEM_NO>
    <ITEM_DESCRIPTION>TYPE I 100/120 MISC</ITEM_DESCRIPTION>
    <OPEN_FLAG>Y</OPEN_FLAG>
    <CANCELLED_FLAG>N</CANCELLED_FLAG>
    <BOOKED_FLAG>Y</BOOKED_FLAG>
    <ORDERED_QUANTITY>75</ORDERED_QUANTITY>
    <ORDER_QUANTITY_UOM>CT</ORDER_QUANTITY_UOM>
    <SHIPPED_QUANTITY></SHIPPED_QUANTITY>
    <SCHEDULE_SHIP_DATE>2011-01-27T23:59:00+00:00</SCHEDULE_SHIP_DATE>
    <NAME>STANDARD ORDER - IRE</NAME>
    <CUST_ACCOUNT_ID>5004</CUST_ACCOUNT_ID>
    <HEADER_ID>6234</HEADER_ID>
    <LINE_ID>7312</LINE_ID>
    <ORG_ID>85</ORG_ID>
    <SHIP_TO_ORG_ID>18929</SHIP_TO_ORG_ID>
    <INVOICE_TO_ORG_ID>4995</INVOICE_TO_ORG_ID>
    <SHIP_SET_ID></SHIP_SET_ID>
    <INVENTORY_ITEM_ID>42032</INVENTORY_ITEM_ID>
    </G_DETAILS>
    <G_DETAILS>
    <SHIP_FROM_ORG_CODE1>202</SHIP_FROM_ORG_CODE1>
    <ACCOUNT_NUMBER>76127</ACCOUNT_NUMBER>
    <DELIVERY_NUMBER>7608</DELIVERY_NUMBER>
    <ORDER_NUMBER>102981</ORDER_NUMBER>
    <CUST_NAME>LION ENGINEERING SERVICES LTD</CUST_NAME>
    <DELIVERY_DETAIL_ID>12357</DELIVERY_DETAIL_ID>
    <LINE_NO>1.1</LINE_NO>
    <ITEM_NO>11004002</ITEM_NO>
    <ITEM_DESCRIPTION>TYPE I 100/120 MISC</ITEM_DESCRIPTION>
    <OPEN_FLAG>Y</OPEN_FLAG>
    <CANCELLED_FLAG>N</CANCELLED_FLAG>
    <BOOKED_FLAG>Y</BOOKED_FLAG>
    <ORDERED_QUANTITY>200</ORDERED_QUANTITY>
    <ORDER_QUANTITY_UOM>CT</ORDER_QUANTITY_UOM>
    <SHIPPED_QUANTITY></SHIPPED_QUANTITY>
    <SCHEDULE_SHIP_DATE>2011-01-27T23:59:00+00:00</SCHEDULE_SHIP_DATE>
    <NAME>STANDARD ORDER - IRE</NAME>
    <CUST_ACCOUNT_ID>5614</CUST_ACCOUNT_ID>
    <HEADER_ID>6235</HEADER_ID>
    <LINE_ID>7318</LINE_ID>
    <ORG_ID>85</ORG_ID>
    <SHIP_TO_ORG_ID>18429</SHIP_TO_ORG_ID>
    <INVOICE_TO_ORG_ID>5605</INVOICE_TO_ORG_ID>
    <SHIP_SET_ID></SHIP_SET_ID>
    <INVENTORY_ITEM_ID>42032</INVENTORY_ITEM_ID>
    </G_DETAILS>
    </LIST_G_DETAILS>
    </G_HEADERS>
    </LIST_G_HEADERS>
    </XXDIPICK_RPT>

Maybe you are looking for

  • How to set multiple alarms on E90?

    Hi guys, I want to set multiple alarms on a 24 hour period of the same day, please give hints on how this can be done, on my pervious handset I was able to set alarms for multiple dates & times. Solved! Go to Solution.

  • Data Table will not bind to Dropdown List selection

    I get the following error when I try to use my own database tables (As in the "Using Databound Components to Access Databases" tutorial). It is a Oracle9i database. The Table (Vehicle)I use to populate the Dropdown List has around 450 000 rows, and t

  • Problem with call waiting in E90

    hi, I am facing problem activating 2nd call using call waiting feature. When second call is coming, i press the call button (green) and nothing seems to happen.. Rather, after that none of the keys seem to work until the other person hangsup or I han

  • Receiving picture with text

    have searched this topic, but only old posts. if i receive a text with a picture attached, and push the download button, it just sits there saying 'downloading" and never stops. i've tried with wifi connected and disconnected. i've seen that if the s

  • How to create Source System in BI 7.0

    Hi Experts, How to create Source System in BI 7.0, please urgent Thanks