How to remove the border from an AWT Component (specifically a ScrollPane)

I've been trying to remove the border from an AWT ScrollPane, but having no luck.
I've tried setting the bounds on the ScrollPane to get rid of the border:
ScrollPane scrollPane = new ScrollPane();
scrollPane.setBounds(-2, -2, getSize().width+4, getSize().height+4);
I've also tried overwriting the paint method of the ScrollPane but it didn't draw anything:
private class CustomScrollPane extends ScrollPane
     public void paint(Graphics p_g)
          super.paint(p_g);
          Graphics2D g2 = (Graphics2D)p_g.create();
          g2.setColor(Color.MAGENTA);     //tried magenta so I could easily see it
          g2.drawLine(0, 0, 0, getSize().width);
Is there anything else I should try? (I wish AWT components had a setBorder method)

Is there anything else I should try? (I wish AWT components had a setBorder method)Actually this probably isn't possible. One of the main drawbacks of AWT was that since everything is connected to peers, you can't actually draw over or customize the view of your AWT component.
The only recommendation I might make would be that you could try creating Canvases around your ScrollPanel that draw over the border

Similar Messages

  • How to remove the "0" from the sum cell when the other cells are empty?

    Hello!
    When I use the formula to sum the values from a few cells, there is a zero in the sum cell when the other cells are empty.
    My question concerns how to remove the 0 from the sum cell when the cells that will be summed are empty.
    Thank you!
    /Johan Strömbeck

    Hi,
    Please try the Mr. Laurence's suggestion first. Then, we may try the other workarounds.
    1) Go to Excel option> Advanced>Display Option for this worksheet> Uncheck Show a zero in cells that have zero value
    2) Go to Conditional Formatting>New Rule>Format only cells that contain> Value equal to 0> Format the color with white
    Hope it's helpful.
    Regards,
    George Zhao
    TechNet Community Support

  • How to remove the Char.from one Operating Concern

    Hi Guys,
    How to remove the Char. from one Operating Concern.
    I have created one Char. (WWDOC) and moved to Operating Concern (OOCC). Operating Concern is in red status.
    Now, i want to remove that new assigned Char. (WWDOC)from the operating concern (OOCC). I did't find any option in the menu also.
    Appreciate your help.....
    T&R
    VVR

    Hi Sasi,
    Iam not able to push back that char. from my operating concern. In help it is given you have to delete the data contents in the table before pushing back. Please let me know if any other option available.
    Thanks for your reply.
    VVR

  • How to remove the bookmark from the table of contents?

    Hi everyone, I have a question:
    How to remove the bookmark from the table of contents in Captivate 6?
    Regards...

    Doug, your frustration is making you "bug" gun trigger happy. LOL
    LOL, I suppose I have.
    I believe the answer you are looking for is in the publishing preferences: under LMS advanced settings, look for the option: never send resume data.
    [can someone please confirm this - I am not at a desktop now]
    Anyhow, selecting this option will stop resume data - so the lesson will treat even returning learners as new. Hopefully, this will work for you.
    This works! Thank you again!
    *but* Why isn't Captivate asking the learner to make the choice of whether to start over or resume. It does this correctly if the lesson is published stand-alone.
    Thanks again!

  • How to Remove the underline from the selection screen parameter

    How to remove the underline from a selection screen parameter ?

    >
    Anoop Menon wrote:
    > hi Avinash,
    >
    > I am not able to understand the use of the 'comment line properly.
    >
    > The last part of the statement which says modif id is confusing.
    >
    > Please clarify..... I am unable to activate my code when I put the selection screen commebnt statement.
    Use this and update it to your requierement !
    SELECTION-SCREEN begin of line.
    SELECTION-SCREEN COMMENT 1(30) comm.
    PARAMETERS test(1) type c.
      SELECTION-SCREEN end of line.
    INITIALIZATION.
      comm = 'test'.

  • How to remove the KF from cube .

    How to remove the KF from cube , I am not able to .
    When I drag the KF outside the structure , I am not able to .
    Regards,

    Hi Jain,
    If data is available in the Info cube we can not Edit,delet and Add a infoobject.But In BI7.0 we a option called remodeling in administration Tab.By this we can add a new infoobject or we can delet it nad we can edit it also.
    i hope this will help u
    assigne point if this help u
    Regarding
    JT Goud

  • How to remove the underline from Title of a report.

    How to remove the underline from Title of a report.
    plz tell.

    You have to go inside the title view :-)
    Regards,
    Stefan

  • How to remove the icloud from my pc

    how to remove the icloud from my hp notebook. I removed the program but yet the device manager is still there.

    says I cloud not been backed upin 12 weeks. plug in lock and connect to interent, but I cant get on internet and cant do anything while this box is there

  • How to remove the square from the icons when selecting them?

    How to remove the square from the icons when selecting them?

    hi jerry not quite sure what you mean, could you elaborate abit more please. lori

  • How to remove the Object from memory.

    Hello.
    Flash file that i made with Flex Builder uses memory too
    much.
    Look at the next example source code.
    var testCan:Canvas = new Canvas();
    this.addChild(testCan);
    this.removeChild(testCan);
    testCan = null;
    but just memory usage still goes up, is not freed instantly.
    so if i load the large flash files on my web browser,
    after 5 munites or something, the web browser is down.
    How to remove the object from memory immediately without
    delay?

    It's all about the Garbage Collector ..
    There is a nice write up here :
    http://www.gskinner.com/blog/archives/2006/06/as3_resource_ma.html

  • How  to remove the check from ShpmntCostsRel. (field VTTK-    FRKRL)

    Hi Experts,
    Can you please tell me to how  to remove the check from ShpmntCostsRel. (field VTTK-    FRKRL) when saving of the shipment document.

    shipment cost calculation only on the Leg level and not on header level. Currently a lot of confusion happened after creating the shipment cost document and found that the status is u201CBu201D.
    now we intend to define detailed specifications to how to create this new user exit to update the shipment cost relevancy at shipment header.
    The main functionality of the user exit  to be created is to remove the check from ShpmntCostsRel. (field VTTK-    FRKRL).can u pls tell how to do this.

  • How to remove the worksets from the Top level navigation for the ESS role.

    Hi All,
    I am working on enabling and disabling certain services in the ESS worksets.
    we are using EP 7.0, ECC 6.0 (NW2004s).
    When I login as a user with ESS role, I can view the changes in the overview pages. However, the worksets are still visible in the TOP Level navigation of th poral. can anyone please explain me how to remove the workset from the Top level navigation.
    Thanks for your help
    Regards
    SM

    Hi,
    Go to the ESS role via Content Admin, then double click the workset (or page or iview) and in the drop down select navigation. Then click the <i>Yes</i> radio button of the "<i>Invisible in Navigation</i>" property.

  • How to remove the border of a JSplitPane?

    Hello,
    I'm using NetBeans 6.1 under Mac OS X 10.5.5, JDK6. When I design my GUI, I want to have the splitpanes witouht border. On Mac and Linux it works fine, however, on Windows and the Metal-Look'n'Feel the borders are painted, although I set the border-property in the GUI-designer to "null".
    My question is, can I additionaly manually remove the border? I found [this sample|http://forums.sun.com/thread.jspa?forumID=57&threadID=566152], but I didn't really help me since I don't know how to handle UIResources...
    Thanks in advacne and kind regards
    Daniel
    Edited by: DnlLdck on Nov 7, 2008 7:16 AM

    I guess you could try overriding paintBorder to do nothing.
    If you post a SSCCE that clearly demonstrates your problem, more members are likely to take a look.
    To post code, use the code tags -- [code]Your Code[/code] will display asYour CodeOr use the code button above the editing area and paste your code between the {code}{code} tags it generates.
    I don't know how to handle UIResources...So take time out from whatever you're doing and learn how to use them. They're no different from other classes.
    db

  • How to remove the WiSM2 from the Catalyst 6500 series switch?

    Hello, can you explain to me how to safely remove the WiSM2 from the Catalyst 6500 series switch?
    According to the documentation "Catalyst 6500 Series Wireless Services Module 2 Installation and Verification Note":
    To remove the WiSM2, perform these steps:
    Step1     Shut down the module by one of these methods:
    In privileged mode from the router prompt, enter the hw-mod module mod shutdown command. NoteIf you enter this command to shut down the module, you must enter the following commands in global configuration mode to restart (power down, and then power up) the module:
    Router# no power enable module modRouter# power enable module mod
    If the module does not respond to any commands, press the SHUTDOWN button located on the front panel of the module.
    Step2     Verify that the WiSM2 shuts down. Do not remove the module from the switch until the POWER LEDis off.
    But, in the case of Step1 (1st methods) I do not see a option "shutdown"  in the command "hw-mod module 3"...
    All I prompted to enter is:
    c6500#hw-module module 3 ?
    boot           Specify boot options for the module through Power Management Bus control register
    reset          Reset specified component
    simulate  Simulate options for the module
    Is it hidden options? IOS version of c6500 is 12.2(33)SXJ1
    In the case of Step2 (2nd methods) there is not any button on the front panel of the module?
    And yet, it is better to remove the module configuration manually or use the command module clear-config prior to removing the module?

    Good catch.
    Which one is true, will get back to you on this if i've something soon.
    http://www.cisco.com/en/US/docs/wireless/module/wism2/installation/note/WiSM_2.html#wp34727
    The above link is procedure to remove wism2. This procedure doesn’t look like wism2 is hot swapable.
    http://www.cisco.com/en/US/docs/wireless/module/wism2/installation/note/WiSM_2.html#wp34621
    All modules, including the supervisor engine (if you have redundant supervisor engines), support hot swapping. You can add, replace, or remove modules without interrupting the system power or causing other software or interfaces to shut down. For more information about hot-swapping modules, see the Catalyst 6500 Series Switch Module Installation Guide.

  • How i remove the stand from an Intel iMac 17"  ???

    Please help...is it possible to remove the stand from an intel based imac 17" . If yes how i do it?
    Thank you

    Only the 24" iMac models have user removable stands. To remove the stands from the 17" & 20" models requires opening and some disassembly of the computer. This is complicated and difficult, and would most likely void any warranty you have left on the machine if it was not done by a Certified Apple Technician.
    But it has been done by some users in the past;
    Why no VESA mount!? grrrr....

Maybe you are looking for

  • Firefox 4.0 not responding minutes at a time in Windows 7

    I've been a Firefox user for many years. Tried Firefox 4 beta for several days with no problems. Updated to 4.0 and now constant "not responding" messages which last several minutes at a time.

  • I have iphone 4 and just updated my software to i.o.s 7 and i have no log and no calls appears in recent calls.

    i have iphone 4 and just updated my software to i.o.s 7 and i have no log and no calls appears in recent calls. what should i do ?????

  • Solution to syncing with two computers

    i have a client who wanted to sync her addresses, datebook, mail etc at her office and her music and photos at home. i was told by many many people at apple that this was impossible. finally i got a great iphone guy on the phone who said sure, you ca

  • PC Music Libr

    Can anybody help. I have just downloaded and installed the latest Media Organizer software from creative. But I have lost the . The tab is not available in the settings either. Has anybodyelse had this problem Can anybody help me retrieve my Library.

  • How to set formula field in crystal report

    Hello all, I develope the code in C#.NET and use SAP B1 2004C. I have a problem with crystal report. I have in crystal report one unbound field. This field is string type. I need in my code change value of this field to another text ex. ("test"). I u