Artifacts in JTable TableHeader, when size changed via setPreferredSize

Hi
I'm using a JTable to show some data instead of a JList.
Now when i change the size of the table header via setPreferredSize, the last column header does some graphical errors/artifacts when i scroll to it. How can I avoid this, but still change the size of the header?
The table is added to a scroll pane and the scroll pane is added to the center area of the panel, which has border layout.
Any and all help is appreciated, thanks a lot.
- Hessi

Don't change the size of the table header.
Change the size of the TableColumn. Read the JTable API and follow the link to the Swing tutorial on "How to Use Tables" for a working example.

Similar Messages

  • Best event when data changes via a user in a datagrid

    How do I capture when data changes via a user in a datagrid?
    change event?

    thanks mate but I'm not sure where to put it:
    <mx:AdvancedDataGridColumn headerText="sell" dataField="sell" textAlign="right" editable="true">
                    <mx:itemEditor>
                        <fx:Component>                   
                        <s:MXAdvancedDataGridItemRenderer>   
                            <s:TextInput width="100%" text="{data.sell}" fontWeight="bold" contentBackgroundColor="#eeeeff" color="#3333ff"  textAlign="right"  restrict=".0-9" maxChars="11">                                           
                            </s:TextInput>                                               
                        </s:MXAdvancedDataGridItemRenderer>                                       
                        </fx:Component>               
                    </mx:itemEditor>                               
                </mx:AdvancedDataGridColumn>

  • Itunes 10.6.1.7 problem: when I change the file "media type" from 'Music' to 'Podcast' the file disapears from ITUNES. I do this via (1) right click, (2) select 'Get Info', (3) select 'options' tab, and (4) change media type. What is the problem?

    Itunes 10.6.1.7 problem: when I change the file "media type" from 'Music' to 'Podcast' the file disapears from ITUNES. I do this via (1) right click, (2) select 'Get Info', (3) select 'options' tab, and (4) change media type. What is the problem?

    Hi Memalyn
    Essentially, the bare issue is that you have a 500GB hard drive with only 10GB free. That is not sufficient to run the system properly. The two options you have are to move/remove files to another location, or to install a larger hard drive (eg 2TB). Drive space has nothing to do with SMC firmware, and usually large media files are to blame.
    My first recommendation is this: download and run the free OmniDiskSweeper. This will identify the exact size of all your folders - you can drill down into the subfolders and figure out where your largest culprits are. For example, you might find that your Pictures folder contains both an iPhoto Library and copies that you've brought in from a camera but are outside the iPhoto Library structure. Or perhaps you have a lot of purchased video content in iTunes.
    If you find files that you KNOW you do not need, you can delete them. Don't delete them just because you have a backup, since if the backup fails, you will lose all your copies.
    Don't worry about "cleaners" for now - they don't save much space and can actually cause problems. Deal with the large file situation first and see how you get on.
    Let us know what you find out, and if you manage to get your space back.
    Matt

  • Adobe Reader, MS Office window size changing when switching displays

    I have a current generation (mid 2012) MBP with Retina Display running ML 10.8.3. I also have a Dell U2413 monitor, confgured for
    1920x1200 resolution, connected via a Thunderbolt to Display Port cable that came with the monitor.
    When I switch displays, Adobe reader, Excel, and Powerpoint all have their window sizes change dramatically. Reader
    shrinks to just the status bar and is tucked in the very bottom left hand corner (it took me quite some time to even see it
    was there at all); Excel windows expand dramatically to be much larger than full screen, and Powerpoint windows shrink
    to about 1.5" square. Other windows (Mail, Chrome, Safari, iTunes) change or move slightly but are more or less OK.
    I know this problem is expected when switching to an external monitor with dramatically lower resolution (e.g. old In Focus
    projectors) but I don't believe it should happen with a hi-res monitor like the one I'm using.
    I have compared this behaviour with other users running same SW versions and external monitors with the same
    resoultion and they don't see this problem so I'm guessing there's some configuration option or low level setting
    that is messed up.
    These window size changes happen going both from internal to external and external to internal. Any ideas?

    I have a current generation (mid 2012) MBP with Retina Display running ML 10.8.3. I also have a Dell U2413 monitor, confgured for
    1920x1200 resolution, connected via a Thunderbolt to Display Port cable that came with the monitor.
    When I switch displays, Adobe reader, Excel, and Powerpoint all have their window sizes change dramatically. Reader
    shrinks to just the status bar and is tucked in the very bottom left hand corner (it took me quite some time to even see it
    was there at all); Excel windows expand dramatically to be much larger than full screen, and Powerpoint windows shrink
    to about 1.5" square. Other windows (Mail, Chrome, Safari, iTunes) change or move slightly but are more or less OK.
    I know this problem is expected when switching to an external monitor with dramatically lower resolution (e.g. old In Focus
    projectors) but I don't believe it should happen with a hi-res monitor like the one I'm using.
    I have compared this behaviour with other users running same SW versions and external monitors with the same
    resoultion and they don't see this problem so I'm guessing there's some configuration option or low level setting
    that is messed up.
    These window size changes happen going both from internal to external and external to internal. Any ideas?

  • After copying a file from NTFS to HFS volume, file size changed when viewing in Windows

    Hi guys,
    I have a Mac Air running Mavericks on a HFS partition and Windows 7 on a BOOTCAMP NTFS partition. I have some files that I want to read/write from/to both systems. Since OS X can't write NTFS and Windows can't write HFS either, and I don't want to use any 3rd-party tools/drivers, I have to adopt a "stupid" way: in OS X, I copy those files from NTFS to its HFS partition, make changes, then switch to Windows and sync them back to NTFS.
    The problem is, after I copied a file from NTFS to HFS in OS X, it seemed ok. But when I switched to Windows, the very copied file in HFS partition had its size changed (bigger) although I didn't make any changes to it in OS X yet. This happens to almost every file I copied, text and binary. For those text files, I tried to open it with EditPlus in Windows and EditPlus reports the correct size on the status bar.
    How could this happen?

    I am not sure if this is what your seeing but...
    The same unaltered file on two different volumes might use different amounts of disk space. This is because a 'disk' is divided in to 'blocks' and a block (also historically known as a 'sector') is a certain minimum size. So if disk-1 has a block size of 512 bytes and disk-2 has a block size of 1024 bytes then a file containing just 10 bytes will use up twice as much space on disk-2 as disk-1 even though it is the exact same file.
    Beyond that, Macs can add additional information like Spotlight tags, labels, icons, etc. which make a file bigger. If you are modifying a file then presumably that also implies adding additional content e.g. for a Word document more text and this will make it bigger. Also depending on some programs are configured or designed 'deleting' text may only mark it as deleted and not really delete. This can apply to older versions of Word which has a 'Fast Save' feature, new versions have removed this and do a proper delete.
    You would have to give more details like what you are doing to the document, what kind of document, and what the two sizes are.
    Finally, there is one other potential difference, some systems and manufacturers use 1024 as a unit for measuring file and disk sizes, some use 1000. It will be the same number of bytes in each case but 1000 bytes in one case would exactly equal 1MB, and in the other it would be 0.9765MB.

  • After successful install, all my adobe cc docs, when open, change pointer arrow, i-beam and window to oversize. When doc closes all return to normal size. I'm on a PC. Screen res set to medium 1920x1200. Any ideas how to fix?

    After successful install, all my adobe cc docs, when open, change pointer arrow, i-beam and window elements to oversize. When doc closes all return to normal size. I'm on a PC. Screen res set to medium 1920x1200. Any ideas how to fix?

    Ok thanks Linxup I would recommend posting in the respective forums for each of those software titles as opposed to the Creative Cloud Download & Install forum.  The relevant forums are as follows:
    InDesign - InDesign
    Illustrator - Illustrator

  • How do i change the cursor on a jtable header when clicked for sorting?

    here is my question, how do i change the cursor on a jtable header when I click the header for sorting?
    I think it is suppose to be in the fragment of code where the header listener is implemented for sorting, but I'm not quite sure what is the exact component that holds everything so that i can change the cursor...
    below is what I've tried, but it doesn't seem to work... thank you
    public void addMouseListenerToHeaderInTable(JTable table) {
    final TableSorter sorter = this;
    final JTable tableView = table;
    tableView.setColumnSelectionAllowed(false);
    MouseAdapter listMouseListener = new
    MouseAdapter() {
    public void mouseClicked(MouseEvent e) {
    TableColumnModel columnModel =
    tableView.getColumnModel();
    int viewColumn =
    columnModel.getColumnIndexAtX(e.getX());
    int column =
    tableView.convertColumnIndexToModel
    (viewColumn);
    System.out.println("column = "+column);
    if (e.getClickCount() == 1 && column != -1) {
    System.out.println("Sorting ...");
    Cursor oldCursor =
    tableView.getRootPane().getCursor();
    System.out.println("oldCursor.getType()
    = "+oldCursor.getType());
    if (oldCursor.getType() !=
    Cursor.WAIT_CURSOR){
    JComponent parentPane =
    tableView.getRootPane();
    parentPane.getContentPane().setCursor
    (new Cursor(Cursor.WAIT_CURSOR));
    parentPane.setCursor(new Cursor
    (Cursor.WAIT_CURSOR));
    Cursor newCursor =
    parentPane.getCursor();
    System.out.println("newCursor.getType
    () = "+newCursor.getType());
    int shiftPressed = e.getModifiers(
    &InputEvent.SHIFT_MASK;
    boolean ascending = (shiftPressed == 0);
    //System.out.println("tableView.getRootPane()
    is "+tableView.getRootPane().getRootPane());
    sorter.sortByColumn(column, ascending);
    tableView.getRootPane().setCursor(new Cursor
    (Cursor.DEFAULT_CURSOR));
    //System.out.println("Done sorting");
    JTableHeader th = tableView.getTableHeader();
    th.addMouseListener(listMouseListener);
    }

    Hi,
    Try setting the cursor for the table header.
    table.getHeader().setCursor(Wait_Cursor);
    Bala.

  • When I move a shape or text in Photoshop, the dimensions/size changes. How do I fix this? ex) moved a 20px x 40px rectangle, and rectangle's dimensions changed to 20px x 40.16px.

    When I move a shape or text in Photoshop, the dimensions/size changes. How do I fix this?
    It's always a decimal point too.
    ex 1) moved a 20px x 40px rectangle, and rectangle's dimensions changed to 20px x 40.16px.
    ex 2) moved a 124pt text to the right (Shift + arrow right a few times) and text changed to 14.06pt.

    When I move a shape or text in Photoshop, the dimensions/size changes. How do I fix this?
    It's always a decimal point too.
    ex 1) moved a 20px x 40px rectangle, and rectangle's dimensions changed to 20px x 40.16px.
    ex 2) moved a 124pt text to the right (Shift + arrow right a few times) and text changed to 14.06pt.

  • When I change size of icons or icon vs list display, why does it affect the whole computer?

    When I change size of icons, or icon vs list display, why does it affect the whole computer? In some folders I want to see a list and others I want to see an icon and I don't need a large icon in all folders. I used to be able to set each folder separately in the old OS. How do I fix this?

    I can hilight an item, go to the finder/file/getinfo but there is no box next to icon view.
    I can go to view/options and adjust the icon size etc, but this applies to every folder in the whole computer. I need varied options in different folders, i.e., I want to view images as icons and text as text. I have to change it every time I open a folder. I used to be able to set it per folder in the old OS.

  • I enlarge text size and it goes back to small when I change page,how doI make it permanent?

    windows 7: when I enlarge text or font size to my preference it goes back to original when I change a page, I want to set it and forget it thanks.

    You can use one of these extensions to set a default font size and page zoom on web pages:
    *Default FullZoom Level: https://addons.mozilla.org/firefox/addon/default-fullzoom-level/
    *NoSquint: https://addons.mozilla.org/firefox/addon/nosquint/
    *http://kb.mozillazine.org/Zoom_text_of_web_pages

  • How to stop size of JTextField from changing when I change font to bold

    I'm working on a Sudoku solver for a CS project. I've got JTextFields for the input. I want to bold the entries of the begining puzzle, like they are in the magazines. When I set the font to bold, it changes the size of the text field. I'm using the gridbaglayout and have tried everything to set in stone the size of a text field, but nothing seems to work. I've set the maximum, minimum size, the setSize method, as well as setting the prefered size. But no matter, when I change the font from plain to bold, the box grows in size. How do I prevent this from happening. I can post my gui code if it would help.
    Here is a link to my grid, with the upper left square having bold text:
    http://12.227.129.113/CS486/Project4/Project4.html

    add them to panel/s set as a gridlayout 9 x 9, or (3 x 3) x (3 x 3)
    simple demo of a 9 x 9
    import java.awt.*;
    import javax.swing.*;
    class Testing extends JFrame
      JTextField[] tf = new JTextField[81];
      public Testing()
        setLocation(200,100);
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        JPanel p = new JPanel(new GridLayout(9,9,5,5));
        for(int x = 0, y = tf.length; x < y; x++)
          tf[x] = new JTextField(2);
          tf[x].setHorizontalAlignment(JTextField.CENTER);
          p.add(tf[x]);
        tf[0].setFont(tf[0].getFont().deriveFont(Font.BOLD));
        tf[0].setText("9");
        tf[1].setText("3");
        tf[66].setFont(tf[66].getFont().deriveFont(Font.BOLD));
        tf[66].setText("9");
        getContentPane().add(p);
        pack();
      public static void main(String[] args){new Testing().setVisible(true);}
    }

  • Slide size change when clicking on pdf links (Acrobat 9 pro)

    Hello,
    I have a problem with an interface mock up I have to deliver to a client.
    The size of image is changing from a slide to another.
    For example, when I click on a home button (this button is a link made in acrobat pro, that send to another page of the pdf document), the slide size changes from full screen to a smaller size with a black border around.
    SOrry it's hard to explain, so I put 2 screenshots and hope it will be clear enough >
    This happen only if I use clicks on the links.
    If I just use the next / previous command (for example if I use keyboard's arrows), the size remain full screen and unchanged for the whole slides.
    Can you tell me how to fix this problem?
    Best regards,
    Mega

    Something to try.
    Using the link tool select the link.
    View the link's properties.
    Select the Actions tab.
    Select the show action then click the Edit button.
    Observe what is displayed.
    You'll note that you can configure the value for "zoom".
    Be well...

  • Image size changes when moving an image between Lightroom and CC.

    Image size changes when moving an image between Lightroom and CC.
    I opened a .dng image in LR and then opened it in the Develop module.  I clicked on Crop Overlay and then on the ‘As Shot’ drop down menu (the lock is closed) and cropped to 11 x 17 and clicked ‘Done’-.
    I click Cntl-E and the image opens in CC.  There I click on Image > Image Size and the Image Size  is 13.288 inches by 20.533 inches.
    Why does the image size change?
    I believe there is a menu to control the size of the image and I've looked everywhere I can think of in LR and CC, I googled various descriptions and I checked two of Scott Kelby's books, but I just can't figure out how to keep the image a consistent size when moving between LR and CC.
    Help!...Please?

    The penny will drop soon or maybe the cloud will lift.
    In Lightroom all editing is undoable/nondestructive.
    Hence a crop of 3x2 is not inches, centimetres, pixels or anything else. It is jst a ratio. When a file is exported, either to PS or disk, then the crop ratio has size determined in respect of pixels and inches or cms.
    So my 6000x5000 pixel image I will crop to 3x2 that leaves (before exporting) a 6000x4000 file.
    Now when exported it can be set to export at
    100pixels per inch and will end up at 60x40" when printed.
    200pixels per inch will end up at 30x20"
    300ppi will end at 20x13.3"
    You will notice in the Crop Tool there are no size denominations such as inches or centimetres as an image file only has pixels and the determination of size is done through exporting or printing.
    Hope that helps somewhat..

  • New user of Mountain Lion. I find that when I attach a URL as a link to Mail 6.0. The font and font size changes!!!!

    I have a problem with either Mountain Lion, Safari or Mail 6.0.
      When I try to attach a URL as a link that is taken from Safari to mail 6.0 the font and font size changes!!!!!
    It changes from comic sans 24 to heltvekia 12!!!! What the heck is going on??????
    Thanks for any help you can shed on this problem.
      BBC1050

    I also upgraded to Lion and do have font problems in Mail. Just in some mails, including my own signature.
    I just updated today with 10.7.1, but still have the font problem.
    Does anyone know if Apple will solve this?

  • Lightroom 5 Help says that to change the size of filmstrip thumbnails: "Place pointer over top edge of filmstrip; when pointer changes to doublearrow, drag the filmstrip edge up or down."  However I never get a double arrow.  Instead I get a hand icon tha

    Lightroom 5 Help says that to change the size of filmstrip thumbnails: "Place pointer over top edge of filmstrip; when pointer changes to doublearrow, drag the filmstrip edge up or down."  However I never get a double arrow.  Instead I get a hand icon that allows me to drag the thumbnails to right or left.  How can I change the filmstrip thumbnail size?

    It works for me. Are you sure you are hovering in the right spot? It's the dividing line between the filmstrip and the Toolbar.

Maybe you are looking for

  • Questions on BPS BAPI calls and PDF forms

    I will need to create a button on a BPS form and that button is supposed to call a BAPI.  One of the buttons will create a PDF of the form (using the contents of the form) and print said form to a 'default' printer.  The issue is that not all cFolder

  • What do I need to get better sound from my Mac mini

    The sound from my external speakers is very poor. I am hard of hearing(50% in one ear) and I find it very difficult to follow a conversation etc. I am now on Yosemite, and the speakers have been used on all my previous  pc's successfully. I cannot fi

  • Error when running root.sh after 11.g2 standalone rac installation

    OS: redhat 5.8 After completing the installation, when running root.sh , I get error: [root@vmorarac1 oracle]# ./root.sh Running Oracle 11g root.sh script... The following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= /u01/app/1

  • Photoshop won't download

    I have tried for 2 days to download the trial version of Photoshop. Nothing is happening. HELP! All that it keeps saying is "Extracting..this may take awhile". I have already looked up all the tips and tried them all. I am using a MacBook Pro and hav

  • A browser with download speed limit?

    It sounds weird but on Linux I can't find a browser that allows to set a download speed limit. I found an extension for Firefox but it works only on Windows. I know the existence of download managers like d4x, wget, jdownloader, etc... but some downl