Are there alternative fill styles for components?

Is there an alternativfe way of filling the background of a component. ie. could you have it filled in diagonal lines?

Ooops, I really walked into that one. OK, I'm a believer in "put up or shut up", so fast and dirty, here's something to do hatching (I picked vertical hatching for quickness, but it's proof of concept).
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Insets;
import javax.swing.Icon;
import javax.swing.JLabel;
public class HatchedLabel extends JLabel {
     private Color hatchColor = null;
     public HatchedLabel() {
          super();
     public HatchedLabel(Icon image) {
          super(image);
     public HatchedLabel(Icon image, int horizontalAlignment) {
          super(image, horizontalAlignment);
     public HatchedLabel(String text) {
          super(text);
     public HatchedLabel(String text, Icon icon, int horizontalAlignment) {
          super(text, icon, horizontalAlignment);
     public HatchedLabel(String text, int horizontalAlignment) {
          super(text, horizontalAlignment);
     protected void paintComponent(Graphics g) {
          if (hatchColor != null) {
               final Insets insets = this.getInsets();
               final int lx = insets.left;
               final int ly = insets.top;
               final int rx = this.getWidth() - (insets.left + insets.right);
               final int ry = this.getHeight() - (insets.top + insets.bottom);
               g.setColor(hatchColor);
               for (int x = lx; x < rx; x += 8) {
                    g.drawLine(x, ly, x, ry);
               for (int y = ly; y < ry; y += 8) {
                    g.drawLine(lx, y, rx, y);
          super.paintComponent(g);
     public final Color getHatchColor() {
          return this.hatchColor;
     public final void setHatchColor(final Color hatchColor) {
          this.hatchColor = hatchColor;
Disclaimer: This has had near-zero testing, so I'm not claiming it actually works for anything but the simplest case. Try it and see if it does ;-)

Similar Messages

  • I do not want Creative Cloud. My current version of Lightroom is 5.7. I take it I have to buy Lightroom 6 outright? Are there any price concessions for upgrades?

    I do not want Creative Cloud. My current version of Lightroom is 5.7. Are there any price concessions for upgrades or do I have to buy Lightroom 6 outright?

    @landaloons who posted: "Clicking 'Checkout' does nothing.  There is apparently no way to get the upgrade at present."
    Your browser has to have tracking enabled and open a pop-up for Checkout to work. Browser add-ons and custom settings can block this from happening.  In Firefox I had to temporarily disable Ghostery to advance past the Checkout button. You may have a similar tracker/pop-up disabler in your browser that you need to turn off temporarily. Alternatively try a different browser with no custom settings. Doing this I was able to download and install a $79.99 upgrade version, so it does work, but they don't make it easy to find or do. They want you to subscribe instead. (In fairness, though, you'd have this same Checkout issue trying to subscribe to CC if your browser settings block advancement past the Checkout button.)

  • Any tools are there in data upload for other than BDC.

    Any tools are there in data upload for other than BDC.

    Hi Hassan,
    <b>LSMW</b>
    <a href="http://sapabap.iespana.es/sapabap/manuales/pdf/lsmw.pdf">http://sapabap.iespana.es/sapabap/manuales/pdf/lsmw.pdf</a>
    <b>Direct Input</b>
    <a href="http://help.sap.com/saphelp_di471/helpdata/EN/fa/097174543b11d1898e0000e8322d00/content.htm">Direct Input</a>
    <b>BAPI</b>'s
    Example :
    <b>BAPI_QUOTATION_CREATEFROMDATA2</b> - Customer Quotation: Create Customer Quotation
    <b>BAPI_PO_CREATE1 </b> -     Create Purchase Order
    <b>Close your previous threads if you have got the answers.</b>
    Regards,
    AS

  • Are there any good tool for checking security risks, Code review, memory leakages for SharePoint projects?

    Are there any good tool for checking security risks, Code review, memory leakages for SharePoint projects?
    I found one such tool "Fortify" in the below link. Are there any such kind of tools available which supports SharePoint?
    Reference: http://www.securityresearch.at/en/development/fortify/
    Amalaraja Fernando,
    SharePoint Architect
    Please Mark As Answer if my post solves your problem or Vote As Helpful if a post has been helpful for you. This post is provided "AS IS" with no warrenties and confers no rights.

    Hi Amalaraja Fernando,
    I'm not sure that there is one more tool that combines all these features. But you may take a look at these solutions:
    SharePoint diagnostic manager
    SharePoint enterprise manager
    What is SPCop SharePoint Code Analysis?
    Dmitry
    Lightning Tools Check
    out our SharePoint tools and web parts |
    Lightning Tools Blog | Мой Блог

  • How many types of ports are there which we use for data transfe in ale/idoc

    friends let me know how many types of ports  are there which we use for transfering
    data in ale/idocs?

    Hello,
    you can use file port,trnasactional RFC port.FI you are using IDOC-XML conversion combination,then you can XML port also.
    Thanks

  • My daughter wants to purchase an ipod touch.  Are there charges or fees for texting ipods other than ios5 systems (i.e. ios4's, etc.)?

    My daughter wants to purchase an ipod touch.  Are there charges or fees for texting another ipod with a system other than the ios5 (i.e. ios4,etc.)?

    Also, there is no battery percentage. The battery drains quicker than in iOS 6. The high power consumption may be fixed in the next update.

  • Are there different php functions for Oracle 8 and 9?

    Hi!
    Are there different php functions for Oracle 8 and 9?
    Thanks for your answer!

    You can use the oci8* functions for Oracle 8, 9 and 10.
    It is the most recent PHP interface to Oracle, and uses Oracle's most recent
    API.
    The name oci8 comes from the version number of Oracle - version 8 - when
    Oracle introduced a new C API. It succeeded the original OCI and got the
    common name OCI8. The original OCI now has the common name of OCI7.
    -- CJ

  • Are there any JDBC Drivers for SQL Server 2000?

    Hello Everyone,
    Any news on the JDBC drivers for SQL Server 2000? I know it is not
    certified yet but is there a date when it will be.
    Which versions of WLS will they work with? Any help is appreciated.
    Sincerely,
    --Luis

    Hello Michael,
    Any news on the JDBC drivers for SQL Server 2000? I know it is not
    certified yet but is there a date when it will be.
    Which versions of WLS will they work with? Any help is appreciated.
    Sincerely,
    --Luis
    "Michael Girdley" <[email protected]> wrote in message
    news:3a6549bb$[email protected]..
    Not yet, but they will appear on the web site in about two weeks.
    Thanks,
    Michael
    Michael Girdley, BEA Systems Inc
    Learning WebLogic? Buy the book.
    http://www.learnweblogic.com/
    "Stefano Picozzi" <[email protected]> wrote in message
    news:[email protected]..
    Are there any JDBC Drivers for SQL Server 2000 for Weblogic Server.

  • Are there a dynamic way for evaluting variables in as3?

    Hi..!
    eval() is a usefull method or function in javascript.. Because we may define our variables via dynamic way..! There are following code is for understanding that how can define dynamic defining variables in javascript.. And Are there a dynamic way for evaluting variables in as3 like following javascript code?
    <script language="javascript1.2" type="text/javascript">
    var trainOfUfo = "...hi earthling...";
    var handleBlade = eval("train"+"Of" + "Ufo");
    alert(handleBlade);  //-- it appears in dialog box text field area "...hi earthling..."---
    </script>
    Gürkan Şahin
    Code Developer
    Turkey

    In AS3 you can use the bracket notation...
    var trainOfUfo = "...hi earthling...";
    var handleBlade = this["train"+"Of" + "Ufo"];
    AS2 supports the eval() function, but it was done away with in AS3

  • Are there any standard retractors for BI 7.0 (from SAP BI to R3)?

    hello
    are there any standard retractors for BI 7.0 (data transfer from SAP BI to R3)?

    You should have some standard retractors for APD and CRM... not sure where you can find them though - should be under business content I guess..

  • Are there any firmaware updates for time capsule?

    Are there any firmware updates for Time Capsule/Time machine?
    I just had a new hybrid (SSD and spinning disk) drive (750 GB) installed on my MacBook Pro and used Boot Kamp to partition it and run Windows xp. Now, my previously working Time Machine won't function. It says the "sparsebundle" is open (or in use)  preventing the back-up from working properly. When I try and remove and re-install Time Capsule as the disk to back-up to, it still doesn't work. My plan "B" is get a second Time Capsule and dedicate it to the MacBook. But, I fear I'll face the same problem.
    When I open to reconfigure Time Machine, the Time Capsule disk is identified as the back-up, but it's also seen in the "available disks to use for back-up" along with with Boot Kamp disk which is part of the new SSD hybrid hard drive just installed. (Remember it's the partitioned part running Windows xp.)
    I've unplugged/plugged-in the ethernet internet connection and the power cord many times to no avail. The message still says the sparsebundle is in the way.
    Do you think deleting Boot Kamp disk from the list of available hard drives might solve the problem?
    Bill in Tulsa

    TM can only use AFP and only on disks formatted HFS+ (ie Mac Extended Journaled) so it should not bring up a boot camp partition as a possible destination at all .. but I have not done that seutp.
    It says the "sparsebundle" is open (or in use)
    That error is well known. It should simply required the TC to be restarted..
    That sometimes gets things working where the simple restart won't.
    I would recommend using short names, with no spaces and pure alphanumeric. 
    That is C9
    http://pondini.org/TM/Troubleshooting.html
    If you have a more complicated setup.. I would recommend firstly doing a TM reset in the computer.
    See A4 in the same reference.
    Do a verify then of the sparsebundle on the TC.. A5 but you might need to inherit the old backup if you want to continue an old backup.. A new hard disk will make the TM consider the old backup no longer belongs to the computer.. there is a UUID connection to the actual hard disk used in the backup.
    Again read the info in pondini. B5 and B6.
    The sparsebundle in use is C12 but there are a number of sparsebundle issues in section C.. C17 is another common issue.
    Some of what you have done is not adequate.. eg disconnecting ethernet is not enough.. you need to reboot the TC.

  • HT201541 are there any new templates for Motion 5 since Motion 4?

    are there any new templates for Motion 5 since Motion 4?

    Hello and good day.
    Yes there are many more templates and with the latest Motion Update we now have 3D Text Templates.
    Plus you can always find new freebies being released here: http://www.fcp.co/forum/9-free-fcpx-plugins-and-templates
    There are also many 3rd party developers that create Motion Templates as well for Motion 5.
    Also, you can create your template with the ability to add many different parameters to control from inside of FCPX.
    Please let me know if you have any questions.  Have a great day!

  • HT1222 Are there any security updates for the Mac OS 10.4.11?

    Are there any security updates for my G4 PowerPC OS 10.4.11?

    No. Tiger is an obsolete and unsupported OS at this point. If there were any updates you would find them using Software Update.

  • Are there any bluetooth adapters for ipod classic to use a speaker?

    are there any bluetooth adapters for ipod classic to use a wireless speaker?

    I know there are a few different bluetooth adapters out there that add bluetooth hardware capability, but I'm not sure of what's available for compatible bluetooth speakers.
    Here is one such bluetooth adapater.
    http://www.buy.com/pr/product.aspx?sku=218214010&sellerid=30193374
    B-rock

  • Are there any user exit for ess travel?

    Hi all
    I want to ask,
    are there any user exit for ess travel?
    and if I want  to know if we already had enhancement for back-end system (sap gui)
    is it automatically applicable to ess too?
    many thanks

    check this
    ESS: BAdi for Checking Mileage
    Thanks
    Bala Duvvuri

Maybe you are looking for

  • My itunes won't open in windows 2000

    I just got my first ipod its a 2nd generation nano, I went to support to learn what all i neded to do to get music on it. Apple support told me to dl the latest version of itunes so i did that. After I installed it, I went to the icon and clicked it

  • Adding a plug-in to just one audio file?

    Hello, I'm really new to Logic Pro and I was curious if there is a way to add a plug-in to just one audio file in a track and not the whole track?  Thanks!

  • XI Web Service Authentication problem

    Hi, I have a XI Web Service that our third-party PeopleSoft client is trying to consume. I tested the Web Service and that works. I used SOAP client testing tool that I have which posts SOAp message to the web service URL. Before i use this tool usin

  • ROLLBACK in RFC receiver adapter

    RFC Adapter invokes update BAPI that send error BAPIRET2 structure. Adapter performs ROLLBACK and I get an exception: <i>Exception caught by adapter framework: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientEx

  • Invoking web service multiple times

    Hello, in CAF I have modeled a business object Order which contains a number of OrderLines. In VC I have modeled a form which is used to collect the metadata of the Order as well as a table containing the OrderLines of the regarded Order. For storing