I hate to use this forum for simple lessons but

I have a JFrame with lots and lots of JLabels on it...I want to paint the JFrame background and make the JLabels' background transparent...I use the following in my JFrame's paint method:
public static class statWindow extends JFrame {
statWindow(String caption) {
super(caption);
public void paint(Graphics g) {
super.paint(g);
window.setBackground(Color.white);
the window flickers white for a second, but then returns to that dull gray...two of the JLabels whose background i explicitly set to the window's bgcolor turn white; why does that matter? am i tying a reference to the window's background? and why won't the window stay white?

(not all code listed..)
public statWindow window;
public static class statWindow extends JFrame {
statWindow(String caption) {
super(caption);
public void paint(Graphics g) {                                   
super.paint(g); // to make JLabels appear even though i am painting 3drect's below
if (currSelectedMatchup == -1) {
return;
for (int i = 0; i < 12; i += 2) {
g.draw3DRect(10,37 * i + 60,250,55,false);
for (int j = 0; j < 9; j++) {
for (int h = 0; h < 2; h++) {
g.draw3DRect(h * 350 + 275,55 * j + 60,337,50,false);
more code
public static void main() {
window = new statWindow("StatTracker - Week " + currWeek);
window.setBackground(Color.white);
}

Similar Messages

  • We are using this code for deleting messege but not working ,

    it is only wokring when i only assign value to sub1 variableassign
    <html>
    <body>
    <%@ page language="java" import="java.sql.*" %>
    <%
    String[] list=request.getParameterValues("list");
    // String list=request.getParameter("list");
    int i;
    String sub1;
    for(i=0;i<list.length;i++)
    try
    sub1=list;
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con=DriverManager.getConnection("jdbc:odbc:dsn1","","");
    Statement stmt=con.createStatement();
    stmt.execute("delete from mes where sub='"+sub1+"'");
    out.println(sub1);
    stmt.close();
    con.close();
    catch(Exception e)
    {out.println(e);}
    %>
    Click here
    </body>
    </html>

    How to iterate through an array:
    String[] array = getItSomehow();
    for (int i = 0; i < array.length; i++) {
    String item = array;
    // Do your thing with 'item'.
    }Or even better, if you're using at least Java
    1.5:String[] array = getItSomehow();
    for (String item : array) {
    // Do your thing with 'item'.
    ode]
    And I recommend you to connect only once, before the
    loop, to save time and to use PreparedStatement to
    avoid SQL injections. And don't forget to close at
    least the connection, otherwise you're leaking
    resources.it is not deleting any message from database but when i assign value as sub1="something"; then it is deleting but i dont understand why it is so please give me its solution

  • How to use Value Mappings for simple translations?

    Hello,
    I want to use Value Mappings for simple translations in mappings, e.g. from IDoc to Inhouse structures.
    For example unit of quantity:
    IDOC    -->    INHOUSE
    PCE               P
    ABC               A
    How can I use Value Mapping for this? What should be used as Agency, what should be used for Scheme? What about groups? I tried the following: I created a new Value Mapping in Integration Directory:
    - Source Agency: DELVRY05
    - Source Scheme: MENEE (IDoc field name)
    - Target Acency: INHOUSE_DESADV (Name of structure)
    - Target scheme: UNIT (Name of field)
    Then, in the table, I added several lines for translating PCE to P and ABC to A and so on. But I have to define a group name for each line. I used INHOUSE. But than I get one INHOUSE group for each line.
    This seems very complicated for simple translations from A to B. I don't want to use FixValue in Message mappings.
    Any help appreciated.
    Thanks,
    Christoph

    Hello,
    @pavan kumar: Thanks, but I know all Blogs about Value Mappings. That does not help me. And I refer to PI 7.1.
    Lets get it very simple: I want to have exactly the same functionality of "FixValues" as ValueMappings. In 7.1, I need to define a Group for every row / line in the conversion table (e.g. for units of measurement conversion between IDoc and FlatFile). That does not make sense for me, as the Group is always the same, e.g. "Unit of measurement". So I will get dozens of same groups called "Unit of measurement".
    I don't really understand the concept of Groups. Maybe this is just not appropiate for my intenses? Maybe the Group has to be defined as one specific value of Unit of measurement, e.g. "pieces"?
    CHRISTOPH

  • A summary of this forum for perspective Nokia buye...

    I have been on this forum for about 2 weeks (not long I admit) ever since the release of "free" navigation for (your) Nokia phone.
    Since then I have observed the following:
    Nokia blatantly refuse to acknowledge or comment on issues which make them look bad, to whit;
    - Nokia maps not working with BlueTooth
    - Nokia Maps failing to update on certain handsets
    - A time/date bug causing phones to crash when using Nokia Maps
    - Nokia voice files failing to install due to an LUA error
    - Nokia's refusal to comment on whether certain phones will be supported
    - Nokia's refusal to answer questions directly either on or off the record
    - Numerous complaints by customers mislead by Nokia's blatant lie that Nokia Maps are     now free for phone.
    - Nokia's license servers failing to work when a license is purchased.
    - Nokia's license servers rolling licenses forward to version 3, and then being unable to work with version 2 when any of the previously mentioned issues arise.
    Nokia have further seen more than 40 users post to say they will never buy another Nokia (myself included) PURELY regarding the dishonesty they have shown with their handling of the maps situation. Nokia have still not commented, nor stated publicly their intentions with regards to these issues.
    Nokia have, in short, angered their (once) loyal customer base and driven numerous people away for the opportunity to (falsly) advertise free navigation on their phones.
    I feel the above is a fairly apt description of the occurences of this board over the last 2 weeks.
    Does anyone else want to point out something I have missed/agree/disagree with me?
    Please post your (reasoned and intelligently ONLY!) oppinions here, and lets see if we might be able to get through to Nokia.
    Perspective buyers, watch this thread.
    EDITED - I messed up the formatting rather badly.
    If you read something you liked, or found this post useful, hit the green Kudos button on the left.

    Err, if you post here, you really shouldnt expect Nokia to reply to you since this is aUSER-TO-USER FORUM. The Nokia hired moderators here arent even technicians who could answer some of the questions. They're just here to enforce forum rules. Some Nokia employees do come around from time to time, but that's so rare as to us not expect them here at any given time. If you want an official Nokia response to your queries, the only way would be to mail them through the contact us button at the top of the page.
    As for shamelessly ignoring questions regarding n95 and n96, lets see. They announced that they were working on the maps to be compatible on other s60v3FP2 phones to be available this year, hopefully within the first half (n96 included). This has been already answered before. Then somebody comes in and posts the same question again. It is answered. A few days later someone else asks it again. Personally, some people here do get tired of answering the same question again and again sometimes at intervals of a few hours of each other. Most of the people here who answer your questions arent Nokia employees and are in no way obligated to answer your questions if they have already answered it like 5 or six times. I've seen here posts regarding the new answer key for the v40 5800 right next to each other asking the same thing, and one of the threads was answered. 
    If you find my post helpful please click the green star on the left under the avatar. Thanks.

  • Can't activate my Premiere 1.5. ( updated to 1.5.1 )  Adobe sent me to this forum for help

    After I format and reinstalled my programs I can;t activate my Adobe premiere pro 1.5 ( updated to 1.5.1) .
    I contacted Adobe at their home page Contact Customer Care , and they send me to this forum for answers.
    Can somebody please help in a dummy language. ( I do not understand a lot of the technical language )
    Thank you in advance.

    that's too old to activate.  you can use cs2, Error: Activation Server Unavailable | CS2, Acrobat 7, Audition 3

  • My iphone 4S wont allow me to restore a bckup of icloud it has just rebooted the os and for over 24 hours i have been trying to fix it i use this phone for my job so i need help

    My iphone 4S wont allow me to restore a bckup of icloud it has just rebooted the os and for over 24 hours i have been trying to fix it i use this phone for my job so i need help. when i try to restore it says "Your iphone could not be activated becuase the activation server is unavailable, If the problom presests goto apple.com/support"   It has done this for 27 hours now PLEASE HELP!!!!!!!!!

    - Connect the iPod to the computer and see if iTunes sees it. If it sees it try to get the photos off the iPod.
    - Next let the battery fully drain. It will likely take days. After charging for at least an hour try again
    - Last, make an appointment at the Genius Bar of an Apple store.

  • I cracked my screen. I want to use other monitor which I had one. I bought Apple Mini-DP to VGA adapter. It worked. It means I can see ADDITIONAL screen. However I want to use this monitor for the main screen. How can I do?? Please help.

    I cracked my screen. I want to use other monitor which I had one. I bought an Apple Mini-DP to VGA adapter. It worked. It means I can see ADDITIONAL screen. However I want to use this monitor for the main screen. How can I do?? Please help.

    You have the display set in Extended Desktop mode. The Menu Bar and Dock will be on the MacBook display and your background screen on the monitor. In System Preferences>Display on the MacBook screen there should be an Arrangement tab when you have the MacBook hooked up to the monitor and both screens working. When you click the Arrangement tab do you see two monitors side by side? One of them will have a Menu Bar at the top. Just click on the Menu Bar and drag it to the second monitor. That will make the second monitor your main screen. You can now use your MacBook in Clamshell Mode with a wired or Bluetooth keyboard and mouse.  http://support.apple.com/kb/HT3131 When you disconnect from the monitor your Menu Bar will automatically change back to the MacBook.

  • How can I use this forum?

    Does anybody here can tell me how can i use this forum???

    What do you want to do? What is your question?
    Randy

  • I cannot load Maverick on my iMac HD.  It reports that my HD is used for Time Machine backups and will not load to that drive.  I do not use this drive for backups.  Help.

    I cannot load Maverick on my iMac HD.  It reports that my HD is used for Time Machine backups and will not load to that drive.  I do not use this drive for backups.  I use an external 1 TB WD My Book for backups as well as Super Duper Backups. Can anyone offer advice.   Thanks.

    Welcome to Apple Support Communities
    You have got the "Backups.backupdb" folder in the root level of your hard drive. This is the folder used by Time Machine to save backups to, and the OS X Mavericks installer thought that your hard drive is being used to store Time Machine backups
    To fix this, open a Finder window, select the Go menu (on the menu bar) > Go to Folder, and type:
    Then, delete "Backups.backupdb" and empty the Trash. Finally, open the Mavericks installer from the Applications folder and follow the steps

  • Use this mailbox for Junk does not appear to work in Mail 4.2.

    Hello, all:
    Have been using 10.6.x since it came out on my previous iMac [24" Early 2008 model]. Went with a fresh install of 10.6.3 on the new iMac [27" i7], and ported data over.
    The only problem that I've had is that setting the Use this mailbox for Junk command in setting up Mail 4.2 does not seem to work. I've closed Mail and looked at ~/Library/Preferences/com.apple.mail.plist, and the correct mailbox name is indicated for the two accounts [IMAP and GMail over IMAP] where I'd like to do Junk Mail filtering. However, there is no centralized Junk Mail filter, which is really annoying me.
    I didn't have this problem previously in Mail 4.x, and I'm expecting that it's a bug specific to 4.2, which I haven't seen in my previous incarnation because I did the import from 3.x->4.0, and the prefs carried forward correctly from 4.0->4.2.
    Anyone else running into this, and is there anything else I should be looking at? Am I explaining the problem such that it's clear what I'm asking?
    Thanks,
    Geof

    I figured out the problem (for me, anyways). In Preferences > Junk Mail, make sure Junk filtering is enabled and make sure the "move it to junk mailbox" radio button is selected.

  • Since updating to LR5.5 it crashes about every 5-10 images while working in the development module. Computer is PC Windows 7 Home Premium. I have been using this computer for several years with zero problems. Is this related to the updating? What is the f

    Since updating to LR5.5 it crashes about every 5-10 images while working in the development module. Computer is PC Windows 7 Home Premium. I have been using this computer for several years with zero problems. Is this related to the updating? What is the fix?

    Do you get an error message? If so, what does it say?
    Do you get a Blue Screen?
    Does something else happen?

  • You can't use this mobile for Nokia Music Unlimite...

    I have just purchased a Nokia 5130 XpressMusic mobile phone which came with music.  I have previously had a similar phone which came with music which for the last year I have been using.  That unlimited downloads has now expired. 
    So I have plugged in my new phone, which I have not used to purcahse any music with through my old unlimited downloads, and it is saying:
    You can't use this mobile for Nokia Music Unlimited edition mobile.
    Can someone please tell me why not?  The phone is capable of playing music (it is an XpressMusic mobile).  I have specifically gone and purchased this phone for the unlimited downloads and will not be very happy if I am unable to activate it.
    Many thanks,
    Tania

    Hi Tania,
    Like @petrib mentioned you should be able find local Nokia Care details behind that Contact us -link up right in this page (or if you tell which country you are in I can check the details for you).
    You could also update to latest Nokia Music Player which has just become available e.g. here http://europe.nokia.com/support/product-support/nokia-music-support and see if activation would work with that.
    -ThreeOs

  • How to "use this mailbox for"....in 10.8

    I am trying to designate a different mailbox for trash. However, prior posts which said to create the "new"  mailbox, select it , and then use the above mentioned menu selection do not appear to work in 10.8. All the selections for this menu item (including "using  this mailbox for trash" are grayed out and not selectable).
    Any thoughts?????

    I am on office 365, and these options are greyed out. IMAP doesn't seem to be an option. Any advice? I really prefer mac mail app to outlook, but being able to access my sent mail is also fairly crucial. thanks!!

  • I want to know that i have recently create an apple id, i want to know that how i can use this id for gsx(without paid) or how to use this id for knowlaged

    i want to know that i have recently create an apple id, i want to know that how i can use this id for gsx(without paid) or how to use this id for knowlaged  
    pls give braef intro about all this things, i have searched on sites but i am not getting exact thing and meaning pls help
    and i wnat to complete hardware exam of mac what should i do
    thanks
    vicckey

    GSX, if you're referring to Apple's service by that name, is available only to employees of Apple-authorized service providers or self-servicing accounts. Unless you are employed by such an organization, you cannot access GSX. If you are employed by such an organization, they should set you up and give you the appropriate login information.
    If you are interested in becoming a certified Apple hardware technician, you can find information here:
    http://training.apple.com/certification/acmt
    Please note, though, that certification does not in and of itself give you access to any of the Apple resouces for support organizations; diagnostic tools, parts ordering, etc. You again must be employed by an authorized Apple support provider before you can gain such access.
    I have no idea what "knowlaged" might be.
    Regards.

  • I have been able to access a site regularly but in the last few days get a message: "cookies required to access this site." please help, I use this site for work daily:)

    I have been able to access a site regularly but in the last few days get a message: "cookies required to access this site." please help, I use this site for work daily:)

    Goto > Settings > Safari... Enable Cookies > Always
    Good luck!

Maybe you are looking for

  • Need help in Conversion

    Hi, Iam doing a report on enhancement, when i use teh code below for the conversion its giving an error To convert GUID in the unicode format             <b>DEFINE move_casting.               assign &1 to <unicode_x1> casting.               assign &2

  • Events disappear from calendar on iPad/iphone4s

    Events on my iPad randomly disappear and also on iPhone. Is it an iCloud issue or a device issue? Can't figure out why things disappear.

  • How to code flash players

    How to code flash players with Html 5 to the lastest versions for my site http://www.beatmart.net

  • Can't load Photoshop after removing vmutils.framework

    Hi, I removed a folder marked 'vmutils.framework' from my Private Frameworks folder, but on doing a search found that it was linked to Adobe functionality.  I dragged the folder back into the correct location but it disappeared - when I looked for it

  • HT1711 Re: I Tunes Gift Card

    I scrathced off the back of my card and some of the numbers are missing.. How to I redeem it.. april