The border around JCheckBox

Hi,
Who can tell me that how to remove the border around JCheckBox? My JCheckBox is the default renderer for boolean type data of JTable.
Thank you.
Janet

Sorry, I still have a problem.
I have written my own Icon class and the paintIcon method as following:
public void paintIcon(Component c, Graphics g, int x, int y) {
JCheckBox cb = (JCheckBox)c;
ButtonModel model = cb.getModel();
int controlSize = getControlSize();
boolean drawCheck = model.isSelected();
if ( model.isEnabled() )
if (model.isPressed() && model.isArmed())
g.setColor( MetalLookAndFeel.getControl() );
g.fillRect( x, y, controlSize-1, controlSize-1);
g.setColor( MetalLookAndFeel.getControl() );
} else
g.setColor( MetalLookAndFeel.getControl() );
g.drawRect( x, y, controlSize-1, controlSize-1);
if (model.isSelected()) {
     drawCheck(c,g,x,y);
But the model.isSelected() method will always return false, how could I get the actual bool value of table's cell? My cell renderer code is as following:
public class BooleanCellRenderer extends JCheckBox implements TableCellRenderer
public BooleanCellRenderer()
super(new CheckBoxNoIcon(),true);
public Component getTableCellRendererComponent(JTable table, Object checkBox,boolean isSelected, boolean hasFocus,int row, int column)
return this;
}

Similar Messages

  • Removing the border around a PopUpButton

    Hi,
    Is there a way to remove the border around a PopUpButton,
    especially the vertical border between the label and the "down"
    arrow (such that it looks like one button, not two)? Thanks in
    advance.
    -los

    My response by email got garbled.
    It should look something like this:
    Button.blankButton{
        upSkin: Embed(source='assets/blank_btn_up.png');
        overSkin: Embed(source='assets/blank_btn_over.png');
        downSkin: Embed(source='assets/blank_btn_down.png');
        disabledSkin: Embed(source='assets/blank_btn_disabled.png');
    Harbs

  • How to create a border around JCheckBox?

    Hello,
    I would like to set a border around a JCheckBox. I don't mean the little square arround the check symbol, I mean the whole component. Does anyone know how to do this?
    More details:
    What I am trying to do is to use a JCheckBox as the renderer for a column in a JTable. However, I would like the values of this column to look like the column headers. In other words, I am trying to create a "row header". However, when I try to set the border of my JCheckBox to the same thing as the header renderer component, it doesn't show up that way. If I just use a JLabel as the renderer, I can set the border and it shows.
    Does anyone have a suggestion? Thank you for your help.

    yourCheckBox.setBorderPainted(true);

  • Removing the border around buttons in a CS Extension

    Hi,
    I'm creating a new extension for Creative Suite, and all  the buttons I have in the extension are using icons, but there is always a border around the button, which I cannot remove. I have tried changing the borderColor to match the background colour of the Extension, but the border is still there.
    I have attached a screen shot of one of the buttons a add button, in the extension so you can see what I mean. This button should just show the plus icon and not have a border around it. How can I remove this border? I'm using CSS to add the icons to the buttons, even using CSS means I can't remove this border.
    Thanks
    Stephen

    My response by email got garbled.
    It should look something like this:
    Button.blankButton{
        upSkin: Embed(source='assets/blank_btn_up.png');
        overSkin: Embed(source='assets/blank_btn_over.png');
        downSkin: Embed(source='assets/blank_btn_down.png');
        disabledSkin: Embed(source='assets/blank_btn_disabled.png');
    Harbs

  • Can i remove the border around the header?

    the border that is automatically created around the header box is creating an annoying separation between the header and page background.. can i get rid of it?

    Please post some code and/or a link to the page(s) you are talking about. To make sure you get help in the most efficient manner possible, read these posts first:
    http://forums.adobe.com/thread/470404
    http://forums.adobe.com/thread/427712
    Just a wild guess, but if your "header box" is an image that is also a hyperlink, you might want to do a Google search on this very common behavior to find a solution:
    http://www.google.com/search?q=border+around+linked+images+html
    Cheers!

  • What is the userChrome entry for the border around input boxes?

    I run KDE with a dark theme, and the input boxes in Firefox 31 are black with white text, which is annoying.
    I learnt to edit the userChrome file and add:
    input {
    background-color: white !important;
    color: black !important;
    Now, there is a problem. While it literally makes backgrounds white and texts black, it leaves an *ugly* black border!
    I took a snapshot, if you want to look: http://linuxmusicians.com/download/file.php?id=490
    What is the name of that black thing, in the userChrome file? How can I change it to white?
    Thanks a lot!

    Hey,
    Sorry the attachment is not working, but there was a css you may try:
    input { background-color: white !important; color: black !important; border: solid white;}

  • Printing in InDesign 5.5 doesnt print the image, just the border. Any idea why this is?

    It will print a blank page other than the border around the image.

    Do you mean that the text frame has a stroke? And what do you mean by "...other than the border"?
    Have you checked these things?
    Is the image on a non-printing layer?
    Is the link missing or is the status out of date?
    Are other images printing fine?
    Does it appear if you print to another printer or print to PDF?

  • How to achieve black border around a logo

    Hello,
    I am trying to do a parody of a Top Gun logo and have it done except for the border around the image. I know this is probably very simple and I've googled it but can't figured it out.
    Here is an example:
    http://www.redbubble.com/people/tgigreeny/works/7360099-top-gun-sundown-with-tomcat
    I want to create that black border/background colour and can't figure it out.
    Thanks for any help you can offer.
    Mary

    Well actually it is a bit more complex than I wrote
    1 You have to outline the text and
    2. united it with the art (color bars that hbe the same color)
    3. you have to give the object a stroke and drag it below the fill in the appearance panel
    4 the jet plane needs a fill of white
    5. the star needs a stroke with the stroke being draged below the fill in the appearaqnce panel
    6. then you group everything and give the group a sufficent weight stroke cover all the gaps
    7 and finally you drag the stroke you gave the group below the contents in the appearance panel (that means it is behind the groups contents the logo art.
    Like such ( You have to think this one out.)

  • White border around images in Easy Rotator

    I would like for there to be a small white border around my images when i put them into easy rotator.  I really just want there to be about a 5 px space around them that is really just the background.  I cant seem to find the right place in the code to make the div that holds the background color... which is white...to make it have like a 5 px padding..
    or even make a 5 px margin around all images.
    I even tried to place the border around my images when placing them in the rotator but the top still pushed all the way up and there was only the white space on the left right and obviously the bottom where the dots are that shows which number slide I am on.
    Where in the code will I find this so I can manipulate it... thanks again for always helping
    avery

    Without a link, it's all guesswork. 
    Use Chrome or Firefox to preview your page.  Right Click and select Inspect Elements.  This should give you some idea of which CSS selectors are used by Easy Rotator.
    Nancy O.

  • Changing thickness of border around fields

    Hi
    Is it possible to change the thickness of the border around a database field/ text box etc? I can only find an option to choose the type of border (Single, Dotted, Dashed etc), but not the thickness.
    The field that I use in the report has the Can Grow property set to True as well.
    I use CR 2008.
    Thanks

    Hi
    @V361-V361
    No, I cannot control the size of the text. So I guess there is no work around to this problem...
    @wickedweapon
    I have just started using Crystal Reports. But it is possible to write formulae (Basic Syntax) to select the type of border.
    If {Table.ColumnName} > value Then
          crDoubleLIne
    Else
          crSingleLine
    End If
    If you write the above code in the top margin section, then the border changes depending on the column value.
    Hope this has helps...
    Tanya

  • Border around an href img

    I know this is going to turn out to be obvious, but....
    http://www.fourcreeks.org/may-creek-basin/watersheds.htm
    The main image is included in an <a href> to make it a
    hyperlink. Before I added the link there was no border around the
    image; now there is.
    I've tried to set the style for the <a> to border:0;
    text-decoration:none; background:transparent but nothing seems to
    remove the border that was added when the link was created.
    What do I need to do to get rid of the border around the
    linked image?
    Thanks
    Tom

    On 27 Sep 2006 in macromedia.dreamweaver, TCarp wrote:
    > I need to bring this topic back up. Using the img border
    0 worked
    > for the initial border around the image, but now I'm
    noticing that I
    > get a dashed border around the image when the link has
    been visited.
    > I experimented with a:visited img, a img:visited and a
    few other
    > combinations but nothing worked.
    >
    > How do I totally eliminate any borders around images
    used as links
    > in any state (hover, visited, etc.)?
    That's an accessibility feature, so that those using adaptive
    devices can
    see where they are on the page. You can eliminate it - do a
    web search
    for 'link scrubber' - but it makes your pages less
    accessible.
    Joe Makowiec
    http://makowiec.net/
    Email:
    http://makowiec.net/email.php

  • Border around a bitmap

    I'm sure its very simple but I'm looking to add a border to a rounded square. 
    The issue is the shape is a bitmap.  I have created a bitmap to make the image have rounded corners, but I can't work out how to have the border around the image.
    Suggesstions in simple terms would be most appreciated!

    A few ideas:
    For a very simple border, use Photoshop Live Effects and choose the Stroke option. (Photoshop Live Effects can be found at the bottom of the Filters/Effects list in the Properties Inspector, once the bitmap is selected.)
    Another simple border could be created using a Glow effect. Set Softness to 0. (Like the Photoshop Live Effect, this can be applied from the Properties Inspector, once the bitmap is selected. Look under 'Shadow and Glow 'within the Filters/Effects list.)
    For more control over stroke style, create a rectangle to match the contour of your bitmap. Set the fill to None. You can use the Properties Inspector to help match the width and height of the rectangle to that of the bitmap, and use the Roundness slider to adjust the rectangle's corners.
    As a variation on the above idea, you could use a vector to mask the bitmap—this would be a particularly good approach if your bitmap did not already have rounded corners. Create a rounded rectangle as described above, setting the fill to either None or white. Then select both the rectangle and the bitmap together and choose Modify > Mask > Group As Mask. Once the mask is applied, select its thumbnail in the Layers panel, and you'll be able to adjust its appearance in the Properties Inspector. You'd want to choose "Path Outline" and "Show Fill and Stroke" in order to have the desired stroke appear.
    (Whoops! Looks like Jim and I cross-posted...)

  • Border around image

    How do I take the border around the image away: http://marketingsource.businesscatalyst.com/lists/business?Preview=True
    need help ASAP!

    Hi there,
    Your URL is lukily live but that preview link , so you know only works if your logged into your site...
    http://marketingsource.businesscatalyst.com/lists/business
    style.css line 256 has..
    #content img, .imageborder
    This element has a background of white, padding and box shadow. It is not actually a border.

  • Border around link image

    I placed an image, then linked it. Now I have a bright blue
    box around it. Any ideas on why it is doing this?

    Use CSS with this rule -
    a img { border:none; }
    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
    ==================
    "cdeatherage" <[email protected]> wrote in
    message
    news:el1sem$snk$[email protected]..
    > The default designation in most browsers indicates links
    by changing the
    > text
    > to blue and adding an underline or placing a blue border
    around an image.
    > [The
    > end user can change that in his/her browser preferences,
    but that is
    > another
    > issue.] Because you made the image a link, your browser
    is showing the
    > border
    > around the image.
    >
    > The only way you can get around that is, in DW go to
    page properties and
    > re-set the colors for links to something that you like.
    If this image is
    > the
    > only link on your page, you can just make the links
    colors the same as
    > your
    > background, and it will disappear. If you have other
    links on the page,
    > however, this isn't going to be practical because they
    will disappear, and
    > that
    > would not be a good thing.
    >

  • Border around links

    Just bought CS3 and dreamweaver adds a blue border to a link
    when a pic is inserted. anybody know why or how to turn it off?
    Thanks
    gcs

    CS3 wants you to learn/use CSS.
    1] Select the image on the page and type 0 for the Border in
    the
    Property Inspector.
    2] Or better - add this to your CSS to remove the border
    around every
    image link:
    a img {
    border: none;
    Alec
    Adobe Community Expert

Maybe you are looking for