Importing a class file to change the Texture colour of a JFrame and JMenu?

Well, my friend told me its possible, he has it on his Jframe, this is the code he uses;
package theme;
import javax.swing.plaf.ColorUIResource;
import javax.swing.plaf.metal.OceanTheme;
public class BlackTheme extends OceanTheme
    public BlackTheme()
    public String getName()
        return "Black";
    protected ColorUIResource getPrimary1()
        return primary1;
    protected ColorUIResource getPrimary2()
        return primary2;
    protected ColorUIResource getPrimary3()
        return primary3;
    protected ColorUIResource getSecondary1()
        return secondary1;
    protected ColorUIResource getSecondary2()
        return secondary2;
    protected ColorUIResource getSecondary3()
        return secondary3;
    protected ColorUIResource getBlack()
        return black;
    protected ColorUIResource getWhite()
        return white;
    private final ColorUIResource primary1 = new ColorUIResource(33, 33, 33);
    private final ColorUIResource primary2 = new ColorUIResource(160, 160, 160);
    private final ColorUIResource primary3 = new ColorUIResource(77, 77, 77);
    private final ColorUIResource secondary1 = new ColorUIResource(0, 0, 0);
    private final ColorUIResource secondary2 = new ColorUIResource(51, 51, 51);
    private final ColorUIResource secondary3 = new ColorUIResource(100, 100, 100);
    private final ColorUIResource black = new ColorUIResource(20, 20, 20);
    private final ColorUIResource white = new ColorUIResource(125, 125, 125);
}So how would i make it use that as the JFrame etc, because i tried like
import theme.BlackTheme;and
MetalLookAndFeel.setCurrentTheme(new BlackTheme()); but it dosn't re-colour it, am i doing something wrong? It only re-colours the actuall outside frame, not the main bits or menu bar as it is suppose to.
Thanks

Here are pictures of how the bar should look and what mine looks like.
THIS IS WHAT MINE LOOKS LIKE
[http://i166.photobucket.com/albums/u116/the_owner2007/menubaretc.jpg]
This is how it should look correct...
[http://i166.photobucket.com/albums/u116/the_owner2007/menubaretcblack.jpg]
Edited by: i_own_pking on Apr 5, 2008 4:07 AM

Similar Messages

  • Importing a .class file into my package?

    Hi. I'm making a java program but I need to use an external .class file to get variables and use methods from. Is it possible to "import" a class file into my package to be able to do so?
    Thanks

    Basically, for our last project we created a class
    that held the information about a year: how many days
    were in a month, how many months were in a year, etc.
    etc. For this project, we'll be having to use that
    same class to make a GUI calendar. Our teacher
    provided a class which he compiled for us to use in
    our projects incase our previous class had some flaws
    in it, which mine did. Unfortunately, it's in .class
    format and I don't know how to use it in my package!That's going to be a problem then. I would assume that it is going to have an API like your old one did. Same name and same methods etc. So do you know what the name and method signatures of your class were supposed to be?

  • Changing the texture in 3D chart

    How do I change the texture on a 3D chart? I've searched all over the Help, but I can't find it anywhere...

    Don't mention it
    I originally came to the discussions looking to find out how how to apply the wooden effect to my charts in Pages. After finding this thread with the search tool I thought I'd poke around more for the texture files.
    I noticed that the textures used on charts in Keynote were dependent upon the theme and could not be changed. Therefore - I poked around in the Theme's package contents
    Sam

  • When I insert a shape, how do I change the color without changing the texture?

    When I insert a shape, how do I change the color without changing the texture?

    Hi,
    you are working with a percentage width of your tables, for example:
    table width="123%
    td width="75%"
    td width="25%"
    So it is simply a arithmetic problem to get the proportional wide (means the ratio of % to cm) of your images, so that they do not break the frame. Certainly you could use (translated from German DW) "properties" and change the sizes there:
    Hans-G.

  • Where can i find the different class names to change the style sheet

    Hi experts,
    i m making a WAD but i need change somethings in the stylesheet, for example, in my query i have some exceptions, i need this exceptions to works some functions of the broadcaster, but i dont need show the exceptions in the report, so, i need a class name to change the stylesheet to dont show the colors of these exceptions when the report is executed, i have seen this function in a report but i dont remember how to do it.....
    for example this works to change a hier from horizontal to   vertical
    <STYLE>
      .SAPBEXHLevel0 {writing-mode: tb-rl;
                                    filter: fliph flipv };
      .SAPBEXHLevel1 { writing-mode: tb-rl;
                                    filter: fliph flipv };
      .SAPBEXHLevel2 {writing-mode: tb-rl;
                                    filter: fliph flipv };
    .SAPBEXHLevel3 {writing-mode: tb-rl;
                                    filter: fliph flipv };
    </STYLE>
    some like this, was the class name to change the colors, please help

    not answered

  • Class names to change the stylesheet

    Hi experts,
    i need the different class names to change the style sheet of my web template, in this moment the problem is this:
    i made a query with exceptions but i do it to get some function with the bex broadcaster, but not to show it when the report is executed, now i need the calls name to chage the color
    i used this class but it was to show some data vertically, now i need to change colors of the web report
    <STYLE>
      .SAPBEXHLevel0 {writing-mode: tb-rl;
                                    filter: fliph flipv };
      .SAPBEXHLevel1 { writing-mode: tb-rl;
                                    filter: fliph flipv };
      .SAPBEXHLevel2 {writing-mode: tb-rl;
                                    filter: fliph flipv };
    .SAPBEXHLevel3 {writing-mode: tb-rl;
                                    filter: fliph flipv };
    </STYLE>

    Hi,
    i am not getting ur requirement. can u explain more.
    Do u want to call different style sheet for different level?
    regards,
    kathir

  • Hello Apple! I see that you have made really good stuff in the new OS X Yosemite version. But you have changed the Texture. Why??? I dont now. Please do a texture-change-program to change the textures. The textures from Mavericks and Yosemite!

    OS X Yosemite is pretty good, but the texture is not good! Please do a texture-change-program. What this is? Its a option in the system settings. What this makes? Its changing the texture. Which texture? From OS X Yosemite and Mavericks. Please change the Mavericks texture! So, that everybody like it! That it looks like the best texture on the world! If you make this, I would be really happy!
    Dear Zuebeyir Said Capar.

    Sorry but you are not speaking to Apple on these forums. This is a user to user forum. To send feedback directly to Apple use this link:
    http://www.apple.com/feedback/

  • HT1364 I am trying to change the location of my itunes library and the library doesn't copy to the new location.

    I am trying to change the location of my itunes library and the library doesn't copy to the new location.  I followed the steps in the help message (HT1364) exactly but I am not prompted to consolidate in the new location.  Any suggestions?

    Hi ed2345 and diesel vdub,  when I consolidate, the files start copying to the new location and part way through I get a message that the copying failed (-50) even though all of the files are already in place in the new location.  Should I just delete the itunes in the new location and manually copy the files again?  But in itunes, I have indicated that the new location is on the external hard drive but itunes seems to ignore that and still looks for itunes in the original location on my internal hard drive.  I disabled the location of itunes in the old location (by labelling itunes as "itunes old") and it tried to create a new itunes at the old location and prompted me to import music and videos from a CD or other source.  I hope I am making sense.

  • How can I change the background colour when working on a doc in full screen view (pages)?

    Recently I have been working on docs without the distraction of having to see my desktop around my page file by using the full screen view in pages. I do find the contrast to an all black screen too harsh though and it makes my eyes more tired than seeing the clutter of my desktop around the page. Is there any way I can change the background colour?
    Any help much appreciated!

    When you are in Full screen mode move the cursor up to the top to show the Format bar. Then look to the far right. There you'll see Background  and a rectangle. Click on the rectangle and change the colour.
    For information on Pages download the Pages User Guide from your Pages Help menu.

  • In Firefox 4 how can I cause the date on downloaded files to be the current date? (Some are and some are not. In FF3 the dates were ALWAYS the current ones.)

    In Firefox 4 how can I cause the date on downloaded files to be the current date? (Some are and some are not. In FF3 the dates were ALWAYS the current ones.)
    == This happened ==
    Every time Firefox opened
    == I upgraded to Firefox 4 (beta)

    Firefox 3.6.* and earlier set the downloaded file's modification time to the current time. In Firefox 4.0 the behavior has been changed, if a server returns a timestamp telling when the file was last modified (Last-Modified header), it is used instead.
    You can revert to the previous behaviour by using the [https://addons.mozilla.org/en-US/firefox/addon/93121/ Download Timestamp] add-on.

  • How do I change the background colour of pdf's?

    I seem to recall changing the background colour of pdf files.
    Anyone know how to change it back?

    Found the answer:
    Open Preview
    Preview Preferences
    General
    Select Window background and change colour.

  • How to change the "short name (account name?)" and home directory name?

    Hi,
    I recently purchased a new iMac and migrated account info from my MacBook Pro.  I happened to use random account name during migration without knowing it will not be easy to change the short name (account name?) and home directory name.  As a result, I am now having extremely confusing short name and home directory name on my new iMac.
    I did online search to find out how to change the two names, but I could only found somethig like "enabiling root user and....."  I have no idea what it was talking about and I don't want to take risk altering such advance set up manually.
    Please advice how I can change the short name and home directory name safely without much PC knowledge.
    Thank you very much in advance.

    There are a few ways of doing this. The easiest method is logging into the first account and copying everything to an external drive (or flash drive or whatever), which changes the permissions so that others can see the files.
    Then, login with the new account and copy the files over. Once they are copied, the correct permissions will be applied again (so other people on your computer can't access them).
    If you can't do this method for one reason or other, you can do some terminal commands to change the ownership of the files. Login to the new account. If it is an admin account, open terminal and type the following command:
    sudo chown -R -v yourusername:admin /Users/originalaccountnamehere
    That should change the ownership of the files from your old account to the new one. At that point, you can simply drag the files into place.

  • Can I change the Screen colour and font size?

    Can I change the screen colour and font size?

    Yes. Use an iPhone browser, such as iExplorer, to access your iPhone's file system. The screensaver photos are stored here;
    /System/Library/PrivateFrameworks/AppleTV.framework/DefaultAnimalPhotos
    /System/Library/PrivateFrameworks/AppleTV.framework/DefaultFlowerPhotos
    Once you locate these files, you can replace the photos with your own or add more to the folders. Do not change the name of the the folder.

  • I want to change the update colour of any hyperlink URL after I have visited it

    I would like to change the highlight colour that my system applies after I have used any URL address link in the main display text. Currently it is a similar shade of blue to that of the original URL and I would like to change this to, say, red. Google tells me to edit one specific CSS file for making this change in Chrome, but I don't use Chrome!! A Windows Explorer search shows several hundred CSS files on my XP SP3 desktop running Firefox 34. Cana anyone help me please? Thanks in advance.

    ''LezLezLez [[#question-1036803|said]]''
    <blockquote>
    I would like to change the highlight colour that my system applies after I have used any URL address link in the main display text. Currently it is a similar shade of blue to that of the original URL and I would like to change this to, say, red. Google tells me to edit one specific CSS file for making this change in Chrome, but I don't use Chrome!! A Windows Explorer search shows several hundred CSS files on my XP SP3 desktop running Firefox 34. Cana anyone help me please? Thanks in advance.
    </blockquote>
    ''Thanks for your reply = this has worked for me. Regards. LezLezLez.''

  • Change the background colour of windows system-wide? (non B/W)

    I have difficulty reading on a white background, but find the White on Black theme doesn't work for me either. The background colour which works best for me is #F9EEE2;. I can work for nearly twice as long in a window with that background colour.
    So I prefer apps which allow me to change the background colour of their windows (e.g. [PathFinder|http://www.cocoatech.com>, [iTerm|http://iterm.sourceforge.net>, [Journler|http://wiki.journler.com/index.php?title=Main_Page], [OmniOutliner|http://www.omnigroup.com/products/omnioutliner>, [BBEdit|http://www.barebones.com/index.shtml], [TranslateIt|http://mac.gettranslateit.com>). I'll pay for this feature.
    However, I often don't have the choice. For example, [PoEdit|http://www.poedit.net/index.php] is the only OSX-native gettext .po editor (since Snow Leopard killed Cocoa-Java and thus [LocFactoryEditor|http://www.triplespin.com/en/products/locfactoryeditor.html]) , so I have to use it. I asked the developer if he could add a preference to change the background colour of the window (PoEdit is Carbon). He replied that this sort of preference should be system-wide, shouldn't it?
    From the Linux POV, yes, it should. Do we have that sort of option in OSX Snow Leopard? Previous OSX theme apps ShapeShifter and Mystique are respectively not yet compatible with OSX, and not available any more. I had a look at [ThemePark|http://www.geekspiff.com/software/themepark> (which does support 10.6), but don't know where to start in editing resource files. So what are our options for changing window background colour system-wide? (Or is there a Carbon plugin or library the PoEdit developer could use to embed that preference for his app.?)
    Thanks for any help you can offer with this.

    I asked a similar question before...as far as I know, there is no option to change this system-wide...short of creating a new color profile or using some hidden Terminal command.

Maybe you are looking for