Removing a JTable border

Hey, I want to be able to remove the border from a JTable.
I have tried:
        JTable newTable = new JTable(table, columnHeaders.toArray());
        newTable.setPreferredScrollableViewportSize(new Dimension(400, 70));
        if (!border) {
            Border empty = new EmptyBorder(0,0,0,0);
            newTable.setBorder(empty);
        }and it doesn't error, but it doesn't remove the border either.
Any ideas? Thank-you in advance.

Sorry for wasting your time, I already have an answer (due to double posting - again, sorry).
For anyone interested, the response can be seen at:
http://forum.java.sun.com/thread.jspa?messageID=9549034
Thank-you for looking.

Similar Messages

  • How to remove a black border box that continously tabs to each field automatically till end of web page; restarts to top of page, cannot stop this box. Scroll bar cannot controlled with mouse, returns auto to top of scroll slide, never remaining at bottom

    how to remove a black border box that continously tabs to each field automatically till end of web page; restarts to top of page, cannot stop this box. Scroll bar cannot be controlled with mouse, scroll bar returns automatically to the top of scroll slide every time I move the bar to the bottom of the scale.  Also, there's a rectangular text box (with black background and white text) that is always on the desktop that emulates a typed text, HTML, or cmd function.

    cjuan1morb4ulv wrote:
    how to remove a black border box that continously tabs to each field automatically till end of web page; restarts to top of page, cannot stop this box. Scroll bar cannot be controlled with mouse, scroll bar returns automatically to the top of scroll slide every time I move the bar to the bottom of the scale.  Also, there's a rectangular text box (with black background and white text) that is always on the desktop that emulates a typed text, HTML, or cmd function.
    The first two problems (box cycling from element to element on page, scroll bar returning to top) can be caused by a stuck (or defective) Tab key on the keyboard. Such damage can be caused by a liquid spill; just one tiny droplet is enough to short a wafer switch under one key.
    The last issue (black box, white text - sounds sorta like a debugger window) I haven't seen, but could be caused by something similar.
    To check for that, try using a different keyboard. If you're using a wireless keyboard, turn it off and see if the oddities stop.

  • Cell border removal in JTable

    I've created a JTable with a DefaultCellRenderer. I need a way of removing the border that appears around each cell(deafult yellow colour) and instead replace it with no border or a border that goes around the entire row. Any ideas?

    add this to your code, just after you create the table:UIManager.put("Table.focusCellHighlightBorder", BorderFactory.createEmptyBorder());

  • Remove Cell Selection Border in JTable

    Hi
    I have multiple columns in JTable populated with data. When the row is selected, the row changes colour. It also places a border around the cell that is selected within the row.
    Is there some way to remove this border?
    Any help would be appreciated.
    Thanks
    Gregg

    Hi,
    you need a different tableCellRenderer. Read:
    http://java.sun.com/docs/books/tutorial/uiswing/components/table.html#custom
    There are also code examples.
    Phil

  • How to remove multiple components border inside a single table column cell

    Hi,
    I'm adding multiple components to a table cell. To provide a good layout I'm using the following component hierarchy in a table column - table-->groupPanel--> gridPanel-->staticText Components 1 ..2 ..3. Now when I do preview in browser or run the app, the table shows up fine, but textComponent s(1,2,3) in the column are each surrounded by a border (which is the width of gridPanel border). Is there a way to get rid of this border?
    This only occurs when you add multiple components in table cell, under gridpanel layout component.
    I've tried searching for a way to remove the grid pane layout component border but couldn't find any info. Used style class border setting to not set but that doesn't help either. I checked forums, tutorial, learning sections etc., but no success. Any help or direction is appreciated..
    Thanks
    -Vinod

    Hi ,
    Can you please post the query ..what u have tried ...
    SQL> select sub from coa1;
    SUB
    XY
    XY
    XY
    XY
    XY
    HXY
    HXY
    HXY
    8 rows selected.
    SQL> select obj from coa1;
    OBJ
    AM
    AM
    AM
    AK
    AK
    AK
    ATK
    ATK
    8 rows selected.
    SQL> SELECT OBJ FROM COA1
    2 UNION ALL
    3 SELECT SUB FROM COA1;
    OBJ
    AM
    AM
    AM
    AK
    AK
    AK
    ATK
    ATK
    XY
    XY
    XY
    OBJ
    XY
    XY
    HXY
    HXY
    HXY
    16 rows selected.
    SQL> insert into coa2 (obj)
    2 (
    3 SELECT OBJ FROM COA1
    4 UNION ALL
    5 SELECT SUB FROM COA1
    6 );
    16 rows created.
    SQL> select * from coa2;
    OBJ SUB MCU DOC F
    AM
    AM
    AM
    AK
    AK
    AK
    ATK
    ATK
    XY
    XY
    XY
    OBJ SUB MCU DOC F
    XY
    XY
    HXY
    HXY
    HXY
    16 rows selected.
    SQL>
    i tried the same it worked fine .....
    so u can combine select and insert statements .. you can get the required result.....!
    Thanks
    Ananda
    Edited by: Ananda on Feb 2, 2009 7:38 PM
    Edited by: Ananda on Feb 2, 2009 7:52 PM

  • Removing a white border around the Extension I'm building

    Hi,
    I have a CS Extension that I'm building, and while working on the UI I have noticed that there is a white line all around the extension, which I cannot get rid of. I've attached a screenshot showing an example of this white border.
    See under the PUBLISH button is this white border. I have set the height and width in the Application tag of my app to 100%, but this does not remove the border. Does anyone know what the problem could be and how to get rid of it?
    Stephen

    Yes. There's a couple of pixels arounf the swf that you can't do much about.
    Make the background color of your extension match the color of the panel, and noone will notice...
    Harbs

  • Quick question - JButton containing an Image - removing the Images border?

    Hi, I have a JButton with an image inside it.
    I would like the JButton to have a border, but not the image when it is clicked.
    It currently looks like this - here
    As you can see, there are two borders (this is once the button has been clicked).
    The one around the JButton is the one I wish to keep, the one around the ImageIcon is the one I would like removed.
    I am sure there is a simple way to do this - I'm sure I have managed it before.
    part of the code used to create:
    JButton money = new JButton();
    money.setBackground(buttonColor);
    money.setIcon(new ImageIcon ("money.gif");

    That thin blue box is indicating the button has focus. It appears even if the button just shows text and has no icon. Here is an example where I get rid of it on btn1 but not btn2.
    And in the future, please post Swing questions to the Swing forum.
    import java.awt.*;
    import javax.swing.*;
    public class ButtonExample {
        public static void main(String[] args) {
            EventQueue.invokeLater(new Runnable(){
                public void run() {
                    new ButtonExample().launch();
        void launch() {
            JPanel cp = new JPanel();
            JButton btn1 = new JButton("button 1");
            btn1.setFocusPainted(false);
            JButton btn2 = new JButton("button 2");
            cp.add(btn1);
            cp.add(btn2);
            JFrame frame = new JFrame("ButtonExample");
            frame.setContentPane(cp);
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.pack();
            frame.setLocationRelativeTo(null);
            frame.setVisible(true);
    }

  • How do I remove the inside border in a JScrollPane?

    I'm trying to embed a JTextArea inside a JScrollPane. Not sure if it matters, but the JScrollPane is inside a JSplitPane, i. e.
    JSplitPane js = new JSplitPane(...)
    JTextArea ta = new JTextArea();
    JScrollPane sp = new JScrollPane(ta);
    js.setBottomComponent(sp);Now when the whole thing is seen, a black border is drawn around the TextArea ta. How do I remove this? Doing sp.setViewportBorder(null) doesn't help. Please help! THX.
    Edited by: solletica on Jun 10, 2008 8:45 AM
    Edited by: solletica on Jun 10, 2008 8:50 AM

    The problem is seen ONLY when the neither scrollbar is visible, i. e. when the AS_NEEDED property is set on JScrollPane. When this happens, a black square border is visible around the JTextArea.
    However, when the vertical or horizontal scrollbars are shown, the portion of the border where the scrollbar appears isn't visible (or noticeable).
    Correct me if I'm wrong, but doesn't JComponent.setBorder() only set the OUTSIDE border of a JComponent? I want to eliminate the border being shown around the JTextArea (i. e. between the JTextArea's bounds and the JScrollPane).
    Edited by: solletica on Jun 10, 2008 9:24 AM

  • Removing the black border from exported videos

    Ok, basically I'm trying to rip DVD footage and convert it to something playable on an iPod. Nothing too hard getting it ripped and converted and all, but the VOB files didn't break right on the episodes, and I also wanted to edit out the theme from the beginning of EACH episode in the interest of space.
    Overall it's working pretty well so far, I've been able to perform all that I needed to do, but when I export I get a wide black border around the video which looks fine now, but will take up a lot of valuable space when reduced to iPod resolution. I've found ways to change the color of the border in FinalCut, but no real way to remove it. Anyone have a way of dealing with this?

    Ok, figured out what to do.
    If you go to the canvas, hit the box for the borders, tell it to show the wire frame. Click and you can rotate, resize, etc.

  • Removing the Flash Border in HTML

    Hello there,
    Does anyone know if it's at all possible to remove the,
    clear, dotted border around any Flash in a HTML document? I've seen
    several websites which don't have the border around. I've created a
    Flash menu for my website and having the border makes this
    difficult, one has to click on the menu then one has to click on
    the button to lead them to where they want to go.
    Regards,
    Kristopher (UK).

    Hi,
    Yes you can by including your the SWF embed code in a
    separate JS file and call it form your HTML page. Adobe released an
    extention to solve this problem on the following link:
    http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=7c29e252
    And if you search on google you can find more methods to
    solve your problem (I guess
    http://www.cartoonsmart.com/
    got another methods too)
    Hope this helps

  • Remove image map border

    Hello, I tried to check if there's an solution to my problem in this forum and around the web.
    I found something but can't really get to get my problem solved.
    I made an hotspot within an image on Dreamweaver (cs6)
    It's a polygonal area.
    I found solutions for image border but not for a polygonal area.
    Can somebody help me?
    Here's the code. maybe it's a bit messed up becuase I tried and tried, but it seems to work correctly (except for polygonal border still showing up)
        <td><img src="/imgs/cristianapalandri-transparent.png" width="140" height="88" usemap="#Map" border="0" style="border": "0"; outline: "0">
        </td>
      </tr>
    </table>
    <map name="Map" id="Map">
      <area shape="poly" coords="31,53,41,34,37,15,63,21,72,10,88,22,122,25,106,51,108,74,68,64,51,73,46,52" href="abstract.html" target="_self" />
    </map>
    </body>
    </html>
    It's a transparent png in a table, this because i have a background image.
    here's the link.
    http://www.cristianapalandri.com/
    Hope you can help me.
    Coz

    Your css is very flawed. You currently have this as your img tag...
    <img src="/imgs/cristianapalandri-transparent.png" width="140" height="88" usemap="#Map" border="0" style="border": "0"; outline: "0">
    It should be written like this...
    <img src="/imgs/cristianapalandri-transparent.png" width="140" height="88" usemap="#Map" style="border:none;" />
    There is no need to remove the outline, that is used for accessibility reasons and should be left in.

  • How do I remove a cell border?

    There is no *blank* border choice.  No "No border" choice.    Nor does tapping on the current choice, e.g.,  Top border, turn it OFF.  Now, that would be sensible!
    So, any ideas?  How does one remove a border that one set?

    OMW!  That definitely works; thank you, thank you!
    It is mislabeled, though, don't you think?!
    If I have a cell with a bottom border , "Set Default Border" implies that a bottom border will become the default border.
    It should be "Remove All Borders"!
    Of course, it means extra steps when you want to remove just the bottom border and not ALL borders.  But, as you say, for now, I'll have to live with it!

  • Removing color picker border

    Hi,
             i am using <mx:ColorPicker /> tag for colorpicker.
    colorpicker component displaying with some graycolor border .
    i need to remove border of color picker component . i just need to display selected color only.
    How can i do this.
    Can any help me?
    thanks
    Raghu

    Sorry for wasting your time, I already have an answer (due to double posting - again, sorry).
    For anyone interested, the response can be seen at:
    http://forum.java.sun.com/thread.jspa?messageID=9549034
    Thank-you for looking.

  • Remove inactive tabs border in Tab navigator

    Hi
    How can i remove the border of inactive tabs in in tab navigator
    Plz help

    Hi,
    This IS possible but hard in the incarnation of the halo tab navigator.
    Check out:
    http://blog.teotigraphix.com/2010/03/08/spark-navigators-viewstack-tabnavigator-accordion
    Within a week I will be releasing that framework opensource (alpha) and it will allow you to easily do this since in Spark, your just creating custom layouts.
    In Halo, the TabBar is like concrete, there is not a lot you can change about it's characteristics without rewritting the whole thing.
    The reason you are getting the ... is that a TabBar is an HBox in disguise. I does have a modified alyout algorithm but is lays out children using the HBox algorithm.
    Mike

  • Remove cell and border

    I am trying this to hide my table cell when the XML value is blank, but it is still printing the cell border etc.
    <xsl:if test="SCHOOL_YEAR_10[normalize-space(.) != '']">
    It there anyway to completely remove the cell from rendering base don that condition?

    Use @column
    eg <?if@column:FIELDNAME!=''?><?FIELDNAME?><?end if?>
    this will hide column if fieldname is null.
    Thanks

Maybe you are looking for

  • Problem While creating DB connect source system to BW

    Hi Guys,   While Creating DB sourc system in BW.The source system was not creating. Sorcesystem-Create- selected the DB source system Logical system: TAXIA03TST Description:For Testing DBMS:ORA Username: Pass word: Given the ORA user name and passwor

  • How to check CPU useage ?

    Dear Team I have one procedure which is executing daily two times(i.e morning run and evening run) In morning run it's executing around 150 mins and evening run executing around 25 mins. It's happening for all procedures executing in longer run in mo

  • Tried to follow the first video tutorial with no success

    Hi, I tried to run the first video tutorial (Your First AFCS Application) on LCCS SDK Navigator with no success. The code as described is: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009"               

  • My msi GT60 OND-255AEK120.......... cannot registered thru msi website

    I bought msi notebook last 11 of January in United Arab Emirates in plugins marina mall, model GT60 OND, but when i tried to register to msi website saying that the serial number is not format or error, how can i registered this to get support form t

  • Help! I've lost all my music

    Help! I've lost all my music! I moved abroad and copied all of my cds to my new ipod touch 3rd. Old computer stored in states. Now I'm in Italy with a new laptop. and when I signed decided to down an app, i had to reinstall itunes, not only did i fai