Removing Space within JTabbedPane

Hi everyone. It seems that whenever I add a component to a JTabbedPane, the component is maximized, but there's still a small space around the component that seperates it from its tab. Does anyone know how to remove this small space? Thanks.
Jon

Easier option: myTabbedPane.setUI(new javax.swing.plaf.metal.MetalTabbedPaneUI() {
    public Insets getContentBorderInsets(int tabPlacement) {
        return new Insets(0,0,0,0);
    }});...if you are using the Metal L&F. If not, you'll have to write your own paintTabBackground() method to add to the above class. Here's a working example:tabbedpane.setUI(new javax.swing.plaf.basic.BasicTabbedPaneUI() {
    public Insets getContentBorderInsets(int tabPlacement) {
        return new Insets(0,0,0,0);
        protected void paintTabBackground( Graphics g, int tabPlacement,
                                       int tabIndex, int x, int y, int w, int h, boolean isSelected ) {
        if ( isSelected ) {
            g.setColor(  (Color)UIManager.get("TabbedPane.highlight"));
        } else {
            g.setColor( tabPane.getBackgroundAt( tabIndex ) );
         switch ( tabPlacement ) {
                case LEFT:
              g.fillRect( x + 5, y + 1, w - 5, h - 1);
              g.fillRect( x + 2, y + 4, 3, h - 4 );
              break;
                case BOTTOM:
              g.fillRect( x + 2, y, w - 2, h - 4 );
              g.fillRect( x + 5, y + (h - 1) - 3, w - 5, 3 );
              break;
                case RIGHT:
              g.fillRect( x + 1, y + 1, w - 5, h - 1);
              g.fillRect( x + (w - 1) - 3, y + 5, 3, h - 5 );
              break;
                case TOP:
                default:
              g.fillRect( x + 4, y + 2, (w - 1) - 3, (h - 1) - 1 );
              g.fillRect( x + 2, y + 5, 2, h - 5 );
});

Similar Messages

  • New to MSSQL - need help with a query to remove spaces within a field

    After data conversion the leading and trailing spaces were removed from the data in the "tag" column.  However spaces in the middle of the column were not removed.  Tag data must be unique.  When I run an update script I get the
    message that "Cannot insert duplicate key in object 'mytablename'.   This tells me that my data looks like this:
    AAAAA[space][space]BBBBB --unique tag
    AAAAA[space]BBBBB -- unique tag
    If I remove the spaces from each I will have duplicates.  Therefore I'd like to update the records as follows:
    AAAAABBBBB --unique tag
    DUP-AAAAABBBBB -- unique tag
    How can I write a script that not only removes the spaces but also identifies the duplicate record?

    Hello,
    You can use the logic below. This would prefix DUP-n where n would be 1 to total number of duplicates values. This is just in case if you have more than one duplicate records.
    create table #duptest (TestData varchar(800), constraint p unique( TestData))
    insert #duptest (TestData) values ('CCCC DDDDD'),('AAAAA BBBBB'),('CCCC DDDDD'),('AAAAA BBBBB'),('AAAAA BBBBB')
    SELECT
    testdata AS ExistingData,
    ISNULL('DUP' + CONVERT(VARCHAR(10),NULLIF(ROW_NUMBER() OVER(PARTITION BY REPLACE(testdata,' ','') ORDER BY (SELECT NULL))-1,0))+'-','') + REPLACE(testdata,' ','') AS UniqueData
    FROM #duptest
    --sIbu

  • How do I remove spaces or special characters within a cell for large amounts of data

    Is there any shortcut to remove spaces between words and numbers within a cell?
    Example:
    Current: .5 lt PET (6)
    Need: .5ltPET(6)
    Is there any shortcut to remove special characters between numbers within a cell?
    Example:
    Current: 0--000--000--0
    Need: 00000000

    Thanks Wayne.
    I have been away from using Numbers or Excel for 4-5 years so it is slowly coming back to me. I am get that I need to use the SUBSTITUTE function however I am having trouble with getting it to work.
    My Data
    ST PAULI 12/12 NR
    $27.16
    12oz NR(12)
    0--80660--95937--5
    ST PAULI 4/6/12 NR
    $28.76
    12oz NR(6)
    0--80660--95935--1
    ST PAULI DK 12/12 NR
    $0.00
    12oz NR(12)
    0--000--000--0
    ST PAULI DK 4/6/12 NR
    $28.76
    12oz NR(6)
    0--80660--95945--0
    ST PAULI N/A 4/6/12 NR
    $20.66
    12oz NR(6)
    0--80660--95955--9
    CAYMAN JACK 4/6/12 NR
    $29.12
    12oz NR(6)
    8--15829--01006--8
    CAYMAN JACK 8OZ/12PK CAN
    $23.18
    8oz CAN(12)
    8--15829--01061--7
    TGIF LIIT 10OZ FROZEN POUCH
    $35.80
    10oz POUCH(24)
    8--15829--01043--3
    TGIF MARGARITA 10OZ FROZEN POUCH
    $35.80
    10oz POUCH(24)
    8--15829--01047--1
    TGIF PINA COLADA 10OZ FROZEN POUCH
    $35.80
    10oz POUCH(24)
    8--15829--01045--7
    TGIF STRAWBERRY 10OZ FROZEN POUCH
    $35.80
    10oz POUCH(24)
    8--15829--01042--6
    BALLAST PT BIG EYE IPA 1/2 BBL
    $190.00
    KEG 1984oz (1/2 KEG)
    0--000--000--0
    BALLAST PT BIG EYE IPA 1/6 BBL
    $73.00
    KEG 660.1oz (1/6 KEG)
    0--000--000--0
    BALLAST PT BIG EYE IPA 4/6/12 CAN
    $33.00
    12oz CAN(6)
    6--72438--00052--7
    There are many more but this is enough to show you. I need to remove all spaces from the First and Third Columns. I need to remove all (--) from the fourth. Where do I put in the substitute function and what is source sting, existing-string, new-string, and occurrence.
    Thank You for your help.

  • How to remove space below text?

    In the screenshot below, how to remove space below text? I simply added a text box using the type tool and I get that extra space bellow the letter "B" that I don't need. I want to remove that space to center the letter within the octogon.
    Thanks!

    You might consider giving the letter a negative baseline shift and aligning it to centre.
    That way you can adjust it so that its anchor point coincides with the centre of the hexagon.
    Like this:
    Another thing: You may find it easier working with type if you hide bounding boxes.

  • Removing spaces from multiple files

    I'm using iWeb to make a photogallery, and when i publish to my server on yahoo, it says there is an error. Now i've had tons of errors and problems with yahoo, and i've come to the conclusion that this problem is because the file names have spaces, and yahoo's servers don't like spaces. So, i was wondering how one would go about removing spaces in file names of multiple files in a folder.

    Don't forget that this won't fix any links within the pages themselves.
    If you have a link to "some page.html" and the script renames the file 'some_page.html', you'll need to manually update the links in the page to the new file name before the link will work.

  • How to remove space after paragrph in pages on ipad

    Can't figure out how to remove space after each paragraph in Pages for Ipad

    Settings > General > International > Region Format
    Set it to your country to format numbers and dates in the way your country does.

  • How do I remove space after paragraph?

    Does Robohelp have the "Remove Space after paragraph" button for reducing the space between lines, like the one in Word?

    In HTML the space after is controlled by the style in your CSS file. You need to edit the style in the Style Editor.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • How do I remove spaces and special characters from the file name during rendering?

    I understand that I can set LR_renamingTokensOn to true, but I would like to replace all spaces in the file name with an underscore and remove characters not in the range A-Z and 0-9. What's the easiest way to achieve this?

    local photo = catalog:getTargetPhoto()
    local sesn = LrExportSession {
        photosToExport = { photo },
        exportSettings = {
            -- ... (determine from export preset) - whatev you want, just be sure you set export directory: LR_export_destinationPathPrefix
            LR_tokens = "{{custom_token}}",
            LR_tokenCustomString = LrPathUtils.removeExtension( photo:getFormattedMetadata( 'fileName' ) ):gsub( "[ %c]", "" ) -- remove spaces and control characters
    sesn:doExportOnNewTask()

  • Removing Space Between Web Parts causes Horizontal Bar in Modals

    Hello all,
    I used the following to remove space between Web Parts, but am now getting a horizontal bar in my modals. Please assist:
    http://www.ashokraja.me/tips/How-To-Remove-Extra-Space-Around-the-Web-Part-In-SharePoint-2013
    Thanks!
    Kelly
    Personal Blog: http://thebitsthatbyte.com

    I removed it using the following CSS, which aligns our spacing:
    Control spacing between Web Parts*/
    .ms-webpart-cell-vertical
    margin-top:
    0px;
    margin-bottom:
    0px;
    Personal Blog: http://thebitsthatbyte.com

  • HT201364 how do i remove space from my start up disk

    How do i remove space from my start up disk?

    Do you mean "make" space on your HD?
    Freeing Up Space on The Hard Drive
      1. See Lion/Mountain Lion/Mavericks' Storage Display.
      2. You can remove data from your Home folder except for the /Home/Library/ folder.
      3. Visit The XLab FAQs and read the FAQ on freeing up space on your hard drive.
      4. Also see Freeing space on your Mac OS X startup disk.
      5. See Where did my Disk Space go?.
      6. See The Storage Display.
    You must Empty the Trash in order to recover the space they occupied on the hard drive.
    You should consider replacing the drive with a larger one. Check out OWC for drives, tutorials, and toolkits.
    Try using OmniDiskSweeper 1.8 or GrandPerspective to search your drive for large files and where they are located.

  • How to remove space from a variable in a smartform

    Hi,
    I have a problem in displaying a variable in a smartform..The variable shows some blank space that preceeds the data.
    for eg:,
    variable =        18.000.
    How to remove space before 18.000?

    To remove the decimal places for quantity and rate/quantity , use the syntax to restrict the number of digits after decimal places. The syntax is
    &symbol(.N)&
    where N is number of decimal places.
    Since you dont want decimals use &symbol(.0)&
    For the other case it depends on how the currency is represented , any way try using the syntex &symbol(T)&
    Please give me reward point If it is useful
    Thanks
    Murali Poli

  • How to remove space below the table in smartforms

    how to remove space below the table in smartforms

    maintain a loop counter for item say count
    and in text editer write
    if count > 6
      new-page.
    endif.

  • How remove space in column ?

    In a.newunit column I have spaces before data. I tried to use TRIM and LTRIM -- but doesn't work :(
    What else I can use?
    SELECT LTRIM(u.scode), LTRIM(a.newunit)
    FROM unit u,
    aaa_test a
    WHERE LTRIM(u.scode) = LTRIM(a.newunit)

    Can you explain what "doesn't work" means, preferrably with an example (i.e. DDL for the Unit and AAA_Test tables, INSERT statements, and a query that returns the incorrect results)?
    TRIM will remove spaces at the beginning and end of a value, LTRIM will remove spaces at the beginning of a value. Potentailly, you don't really have spaces at the beginning of your data. Potentially, you are misinterpreting something (in which case seeing what constitutes "not working" is critical).
    Justin

  • Remove spaces and special characters from a form field

    Hi,
    I am tragically new to all of this, but am trying to create a form in Adobe Acrobat 9.  I am trying to use a Custom Format script to take inputs in a form field and automatically remove spaces and special characters (hyphens specifically).  For example, if a user inputs "RAN-99 06" I would like it to change to "RAN9906."  I found this script that will not let users input special characters
    if (!event.willCommit) {
        event.change = event.change.replace(/[\$#~%\*\*\^\-\(\)\+=\[\]\{\};\"\<\>\?\|\\\!]/g, "");
    And that's okay, but I can't figure out how to disallow spaces.  Also, the perference would be for a script to allow users to input the data as they like, but to clean it up after they leave the text field.
    Thanks in advance!

    From the description, I assume that the script is currently in the Keystroke event. In fact, that would be a most logical way to have it; simply ignore anything unwanted when entered.
    If you want to allow the user to enter anything, but "clean it up" when done, you would place your code in the Validate event. You will have to adjust your Regular Expression so that it works globally, but that's the whole difference. This will change the value.
    Note that you can also enter the code into the Format event. However, that would only change the visual representation of the value, but internally, the value would remain as entered.
    Hope this can help.
    Max Wyss.

  • Spaces within access db field name

    I am trying to use data which was extracted to a excel file
    then imported into a access database.
    During the import access database used the first roll to be
    the field name and some names has space within.
    When I try to access those field inside CF and i will get a
    error message since the CF won's understand any field names with
    space inside the name.
    Is there a work around? Since change the field name each time
    will take lots of time beacuse the db will be exported every day.
    Thanks

    Is there a work around? Since change the field name each time
    will take
    lots of time because the db will be exported every day.
    Thanks
    Yup, two of 'em even.
    The first is in the SQL language, you can alias the columns
    with the AS
    command. This one is probably preferred by most developers.
    SELECT ['Column With Spaces'] AS NoSpaces
    FROM aTable
    Secondly you can use the array notation ability of ColdFusion
    to
    reference variables with bad names. For queries that would be
    queryName[columnName][row].
    <cfoutput query="aBadQuery">
    #aBadQuery["Column With Spaces"][currentRow]#
    </cfoutput>

Maybe you are looking for

  • Rs-232 to USB converter trouble

    Hi, everyone I have developed an application in labview 6.1 for communicating with an instrument via serial port, using serial compatibility VIs. the software works ok in the development machine which has a rs-232 port, but i can´t make it start in o

  • Oracle BPM 10gR3  PAPI

    I am using Oracle BPM 10gR3 studio. I want to access the processes available in bpm through core java client from eclipse. Could anyone explain me how can i access the bpm process from java client ? Thanks in advance.

  • What is the purpose or functions of these tables?

    Dear Experts, Briefly, could you explain what is the purpose or function of these tables: 1. INOB - link between internal number and object. Is internal number = internal order number? related to project? purpose? 2. AUSP -  Characteristic values - w

  • Choose from list in the system

    Hi I want to create the Choose from list in the System form (Employee Master Data) in the edit box. what is the coding for this ? can anyone help me ... Regards Bhuvana Edited by: bhuvana eshwari on Aug 7, 2008 8:23 AM

  • How to view the design part of th source code

    hi i have a source code in NetBeans IDE.i have to view the design part of that source code.because i shared that design part through local address which is designed in another system .Ater sharing i got tha coding part of that design part.But i need