GUI swing objects mass quantity color change(fore&back)

Alright here is what I am trying to achieve:
I have almost 300 items in my GUI,
I want to change the font and background color of EVERYTHING at once.
I added the items to the GUI for my little application over the course of a few weeks of scripting so it was easy to add line after line of:
*****.setBackGround(back);
*****.setForeGround(fore);
where back and fore are colors set via some menu option and are being changed very often.
I am thinking "look and feel" is the way to go, but before I learn something that may not help me I would like a little advice.
I tried making an arraylist of type Object and then calling them in a loop but alas java doesn't believe me that every object in the array has both setBac... and setFore...
any advice/comments are appreciated.
-Jake(Actingrude)

I guess before I continue looking around for a solution, am I right to assume that a "look and feel" would effect ALL of my swing components and have the ability to set the color scheme of everything with just 1 method call, rather than two for each swing object?Create a [url http://sscce.org]SSCCE to test the suggestions that have been made. If you have problems then you can post your SSCCE and we might be able to help you out.
The basic code for changing the properties of all text fields should be something like:
UIManager.put("TextField.foreground", new ColorUIResource(...));
UIManager.put("TextField.background", new ColorUIResource(...));You would need code like that for all components you wish to change.
Read the section from the Swing tutorial on [url http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html]How to Set the Look and Feel. I think you need to invoke the updateComponentTreeUI() method.

Similar Messages

  • Need help for finding objects impacted by size change for an infoobject

    hi all,
    need help for finding objects impacted by size change
    for xxx infoobject, due to some requirements, the size to be changed from
    char(4) to char(10), in the source database tables as well as adjustment
    to be done in BI side.
    this infoobject xxx is nav attribute of YYY as well as for WWW
    infoobjects. and xxx is loaded from infopkg for www infoobject load.
    now that i have to prepare an impact analysis doc for BI side.
    pls help me with what all could be impacted and what to be done as a
    solution to implement the size change.
    FYI:
    where used list for xxx infoobject - relveals these object types :
    infocubes,
    infosources,
    tranfer rules,
    DSO.
    attribute of characteristic,
    nav attribute,
    ref infoobject,
    in queries,
    in variables

    Hi Swetha,
    You will have to manually make the table adjustments in all the systems using SE14 trans since the changes done using SE14 cannot be collected in any TR.
    How to adjust tables :
    Enter the table name in SE14. For ex for any Z master data(Say ZABCD), master data table name would be /BIC/PZABCD, text table would be /BIC/TZABCD. Similarly any DSO(say ZXYZ) table name would be /BIC/AZXYZ00 etc.
    Just enter the table name in SE14 trans --> Edit --> Select the radio button "Save Data" --> Click on Activate & adjust database table.
    NOTE : Be very careful in using SE14 trans since there is possibility that the backend table could be deleted.
    How to collect the changes in TR:
    You can collect only the changes made to the IO --> When you activate, it will ask you for the TR --> Enter the correct package name & create a new TR. If it doesn't prompt you for TR, just goto Extras --> Write transport request from the IO properties Menu screen. Once these IO changes are moved successfully, then the above proceduce can be followed using SE14 trans.
    Hope it helps!
    Regards,
    Pavan

  • How can I automate the threshold for a moving object whose light intensity changes for each frame.

    I'm using the PCI-1408 and I have this video where an object's shape and color intensity changes for each frame. I want to do a pixel count of that object verses the background (the background also changes color) for each frame. I'm guessing that I need an automatic threshold, but I really have no idea of how to implement this. Any ideas, anyone?

    Hopefully there is a clear distinction between the background and the object.
    You can use IMAQ AutoBThreshold to determine the threshold level for an image. You can select from a variety of methods for determining a binary threshold level. Route the "Threshold Data" output along with your image to IMAQ MultiThreshold, which will quickly apply the threshold to your image. Display the results using WindDraw and the Binary palette (from IMAQ GetPalette).
    This should run close to real-time. Binary thresholding is a fairly fast operation. You will probably end up processing every other image, which is close enough for most projects.
    Bruce
    Bruce Ammons
    Ammons Engineering

  • Is it possible to do a GLOBAL color change for both text and graphics in ACrobat XI?

    I used to do this using the Pitstop Pro plugin but now Pitstop is almost $900 and this is the only thing that I would use it for, not worth the investment
    I can change text color by selecting individual text items, but I want to change all of the red text into white text
    I also need to change all of the red graphics into white graphics and I can't figure out how to do that either
    I have a trial version of XI on a Mac and will buy it if it can do what I am trying to do, i.e. global color changes to both text and graphics
    thanks!!

    I have version 6, but it is way out of date, doesn't work on my current system, I downloaded a trial version of the new one, version 12 I think, now I have to decide if I can afford to buy it, it is not cheap!
    oops, sorry, I didn't read your entire message, aargh!
    I'll check with them if I can upgrade from this early version, thanks for the suggestion!
    (edited because I didn't read properly!)

  • Background color change for  XML Template

    Hi All,
    We have created a xml template for creation of news using xml form builder. When we are creating a news by using this template the background color of the news always shows SAP default color (light blue) for both Renderlist and Show forms. Our requirement is to change the background color.
    Any help can be appreciated  and points will be rewarded immediately.
    Thanks,
    Satya

    Hi Satyadev,
    You have 3 options:
    Within the forms builder you can get a white background by setting the form to either "border" or "no border".  This is done by clicking anywhere on the form (where there is no other element) and modifying the "style" property
    You can modify the portal theme so that the background colour is your choice.  However this will affect all forms in the portal, not just this one.
    Or you can manually modify the form XSL stylesheet.  This involves typing the html code to apply your chosen colour.  However, this modification is lost if you re-generate the XML forms project, so this should be a last resort.
    Hope this helps,
    Chris

  • No color change for mandatory parameters in Report Launch Form

    Report Launch Form (qms0012f) does not color the mandatory report parameters when running on 9IAS webserver.
    We are using Designer 6i with Headstart 6.5.3.0.
    On client server the mandatory report parameters are changed to user preference color.
    Testing when running the form with the Developer Web Previewer of Forms Builder 6i the mandatory parameters are also changed to user preference color but the background color is white instead of gray?

    Cheryl,
    I'm sorry, on creation of Headstart 2.1 we added the implementation_name to the qms_modules table, but we just plain forgot to modify qms0012f as well. As most people have the implementation name identical to the module name, nobody noticed until you did!
    If you want to change this, you should modify library qms0012l.pll.
    Go to package qms0012f,
    find the declaration of g_short_name_item, and add a similar one g_implementation_name_item where 'SHORT_NAME' is replaced by 'IMPLEMENTATION_NAME'. In the same package qms0012f, find the function get_short_name_item and add a similar one get_implementation_name_item.
    Then go to package qms$report, function fill_par_list. At the end of this function, you will see a statement l_module_name := name_in(qms0012f.get_short_name_item);
    Change this into l_module_name := name_in(qms0012f.get_implementation_name_item);
    I am not able to test this, but I think it should work. Please let us know if this workaround helps, then we can include it in Headstart 6i.
    Hope this helps,
    Sandra

  • Does Anyone Know About Color Change For iPhone 4?

    i Cracked my scree, well shattered it, but im going to the apple store soono, and i was wondering if anyone could tell me since im paying $200 for another one, if i could get them to swap the color from black to white? anyone know? i mean i am paying for it, so why not? Anyone let me know whether you work there or  have done this before.

    Out of warranty exchange is for same model, capacity, and color.
    It would not hurt to ask, but it is unlikely they will offer a different color.

  • Color Changes while using Text Messaging on iOS5

    Ever since I updated my iPhone 4 software to the new iOS5 I've notice something a little different with the text messaging.  Some of the text messages are bubbled or highlighted in a light blue while others are the standard green color.  They have all been green but now I'm seeing blue.  Why are some blue and some green?  Can I change to other colors as well?  Just trying to understand the color changes for some people.
    Thanks!
    Gilbert

    Blue messages use iMessage (other iOS 5 devices). Green messages are traditional SMS messages.

  • Mass changing for accrual object assignments part of the field profit_ctr

    Hi Experts,
    Does any one know about mass changing for accrual object assignments part of the field profit_ctr (profit center).
    How can we do this?
    Best Regarts.

    Hi,
    I have equal problem. How did you save him?
    Regards,Irena

  • Listen for an events for Swing objects in a separate class?

    Hi all, sorry if this is in the wrong section of the forum but since this is a problem I am having with a Swing based project I thought i'd come here for help. Essentially i have nested panels in separate classes for the sake of clarity and to follow the ideas of OO based development. I have JPanels that have buttons and other components that will trigger events. I wish for these events to effect other panels, in the Hierachy of my program:
    MainFrame(MainPanel(LeftPanel, RightPanel, CanvasPanel))
    Sorry I couldnt indent to show the hierarchy. Here LeftPanel, RightPanel and CanvasPanel are objects that are created in the MainPanel. For example i want an event to trigger a method in another class e.g. LeftPanel has a button that will call a method in CanvasPanel. I have tried creating an EventListner in the MainPanel that would determine the source and then send off a method to the relevant class, but the only listeners that respond are the ones relevant to the components of class. Can I have events that will be listened to over the complete scope of the program? or is there another way to have a component that can call a method in the class that as an object, it has been created in.
    Just as an example LeftPanel has a component to select the paint tool (its a simple drawing program) that will change a color attribute in the CanvasPanel object. Of course I realize i could have one massive Class with everything declared in it, but I'd rather learn if it is possible to do it this way!
    Thanks in advance for any help you can offer
    Lawrence
    Edited by: insertjokehere on Apr 15, 2008 12:24 PM

    Thanks for the response, ive added ActionListneres in the class where the component is, and in an external class. The Listeners work inside the class, but not in the external class
    import java.awt.event.ActionEvent;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.ActionListener;
    public class LeftPanel extends JPanel implements ActionListener {  
        /* Constructing JButtons, null until usage of the constructor */
        JButton pencilBut;
        JButton eraserBut;
        JButton textBut;
        JButton copyBut;
        JButton ssincBut;
        JButton ssdecBut;
        ActionListener a = new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                System.out.print("\nNot supported yet.");
        /* The Top Panel contains the title of program */
        public LeftPanel(Dimension d){
            /* Sets up the layout for the Panel */
            BoxLayout blo = new BoxLayout(this,BoxLayout.Y_AXIS);
            this.setLayout(blo);
            /* Sets Up the Appearance of the Panel */
            this.setMinimumSize(d);
            this.setBackground(Color.RED);
            this.setBorder(BorderFactory.createLineBorder(Color.BLACK, 1));
            /* Pencil Tool */
            pencilBut = new JButton("Pencil");
            pencilBut.setAlignmentX(Component.CENTER_ALIGNMENT);
            pencilBut.setActionCommand("pencil");
            pencilBut.addActionListener(a);
            this.add(pencilBut);
            /* Eraser Tool */
            eraserBut = new JButton("Eraser");
            eraserBut.setAlignmentX(Component.CENTER_ALIGNMENT);
            eraserBut.addActionListener(a);
            this.add(eraserBut);
            /* Text Tool */
            textBut = new JButton("Text");
            textBut.setAlignmentX(Component.CENTER_ALIGNMENT);
            textBut.addActionListener(a);
            this.add(textBut);
            /* Copy Previous Page */
            copyBut = new JButton("Copy Page");
            copyBut.setAlignmentX(Component.CENTER_ALIGNMENT);
            copyBut.addActionListener(a);
            this.add(copyBut);
            /* Stroke Size Increase */
            ssincBut = new JButton("Inc");
            ssincBut.setAlignmentX(Component.CENTER_ALIGNMENT);
            ssincBut.addActionListener(a);
            this.add(ssincBut);
            /* Stroke Size Decrease */
            ssdecBut = new JButton("Dec");
            ssdecBut.setAlignmentX(Component.CENTER_ALIGNMENT);
            ssdecBut.addActionListener(a);
            this.add(ssdecBut);
            System.out.print("\nLeftPanel Completed");
        public void actionPerformed(ActionEvent e) {
            System.out.print("\nAction Performed");
        }But this is not picked up in my external class here
    import java.awt.event.ActionEvent;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.ActionListener;
    public class MainPanel extends JPanel implements ActionListener {
        /* Creates a new the main JPanel that is used in the FlipBookFrame to contain all of the elements */
        public MainPanel(){
            /* TopPanel constraints*/
            tpcs.gridx = 1;
            tpcs.gridy = 0;
            tpcs.gridwidth = 1;
            tpcs.gridheight = 1;
            tpcs.fill = GridBagConstraints.BOTH;
            tpcs.weightx = 0.0;
            tpcs.weighty = 1.0;
            /* LeftPanel Constraints*/
            lpcs.gridx = 0;
            lpcs.gridy = 0;
            lpcs.gridwidth = 1;
            lpcs.gridheight = 3;
            lpcs.fill = GridBagConstraints.BOTH;
            lpcs.weightx = 1.0;
            lpcs.weighty = 1.0;
            /* CentrePanel Constraints*/
            cpcs.gridx = 1;
            cpcs.gridy = 1;
            cpcs.gridwidth = 1;
            cpcs.gridheight = 1;
            cpcs.fill = GridBagConstraints.NONE;
            cpcs.weightx = 0.0;
            cpcs.weighty = 0.0;
            /* RightPanel Constraints*/
            rpcs.gridx = 2;
            rpcs.gridy = 0;
            rpcs.gridwidth = 1;
            rpcs.gridheight = 3;
            rpcs.fill = GridBagConstraints.BOTH;
            rpcs.weightx = 1.0;
            rpcs.weighty = 1.0;
            /* BottomPanel Constraints*/
            bpcs.gridx = 1;
            bpcs.gridy = 2;
            bpcs.gridwidth = 1;
            bpcs.gridheight = 1;
            bpcs.fill = GridBagConstraints.BOTH;
            bpcs.weightx = 0.0;
            bpcs.weighty = 1.0;   
            this.setLayout(gblo);   //Sets the Layout of the panel to a GridBagLayout
            this.add(tp, tpcs); //Adds the TopPanel to the MainPanel using the TopPanel layout
            this.add(lp, lpcs); //Adds the LeftPanel to the MainPanel using the LeftPanel layout
            this.add(cp, cpcs); //Adds the CanvasPanel to the MainPanel using the CanvasPanel layout
            this.add(rp, rpcs); //Adds the RightPanel to the MainPanel using the RightPanel layout
            this.add(bp, bpcs); //Adds the BottomPanel to the MainPanel using the BottomPanel layout
            gblo.layoutContainer(this); //Lays Out the Container
        public PanelSizes getPanelSizes(){
            return ps;
        public void actionPerformed(ActionEvent e) {
            System.out.print("\nExternal Class finds event!");
            /*String command = e.getActionCommand();
            if (command.equals("pencil")){
                System.out.print("\nYESSSSSSSSSSSSSSSSSSSSS!");
        /* Create of objects using the PanelSizes funtions for defining the */
        PanelSizes ps = new PanelSizes();   //Creates a new PanelSizes object for sizing the panel
        CanvasPanel cp = new CanvasPanel(ps.getCentrePanelDimension()); //Creates a new Canvas Panel
        TopPanel tp = new TopPanel(ps.getHorizontalPanelDimension()); //Creates the TopPanel
        BottomPanel bp = new BottomPanel(ps.getHorizontalPanelDimension()); //Creates the BottomPanel
        LeftPanel lp = new LeftPanel(ps.getVerticalPanelDimension()); //Creates the LeftPanel
        RightPanel rp = new RightPanel(ps.getVerticalPanelDimension());   //Creates the RightPanel
        /* I have chosen to create individual constraints for each panel to allow for adding of all
         components a the end of the constructor. This will use slightly more memory but gives clarity
         in the code */
        GridBagConstraints cpcs = new GridBagConstraints();
        GridBagConstraints tpcs = new GridBagConstraints();
        GridBagConstraints bpcs = new GridBagConstraints();
        GridBagConstraints lpcs = new GridBagConstraints();   
        GridBagConstraints rpcs = new GridBagConstraints();
        GridBagLayout gblo = new GridBagLayout();
    }Any help will be greatly appreciated :-)

  • Changeing to mouse floatable in java swing object

    Hi All
    I want change to my select mouse floatable swing object functionality in java swing Application. If it mouse over functionality window or Frame based application. If anybody feel easy sloution that ,plz help solve this problem.
    Thanx to Advance.
    Bye
    ARjun...

    select mouse floatable swing object"huh?
    If it mouse over functionality window or Frame based application.double huh?
    be a little more clear..i don't think anyone here understand what you're asking for.
    here's my take on your question (guess).
    Are you asking for dockable Panel and component?
    ie)
    you have a create JComponent that is added to a JFrame, etc..
    When the user move the mouse over the component, and perform a mouse press, you want to allow the user to move the component to another location (the component is dockable??)
    There are severals Dockable panel and compoent out there for free..so i suggest that you would use them ; rather than writing your own.

  • Mass Change for Service master

    Dear Experts,
    I've tried to do Mass change for service master.. in transaction MASS, i couldnot able to find the object for service master there..
    Is there any possiblity to do mass change for Service Master
    thanks

    Hi,
    I have tried ur scenario. Mass change for service master was possible using the TCode: MASS. But if u go to the Tcode:MASS, system asks object type. object type for service is not available in the match code/input help(F4).
    At any time, if u want to know the object type for any transaction , goto the Tcode: SW02.(path: SAP Easy access: SAP Menu->tools-> ABAP work bench->overview->business object overview( SW02).
    click on materials mgmt.-> external services mgmt.-> service master ( in the tree list).
    Object type for service master: BUS1005
    this business object is useful for list display for service master records(get list), read detail data for a service master record, create& change service, display object, check existance of object.
    object type for attributes in service master: IFSAP
    reference table: ASMD
    goto SW02, to find object type for any transaction.
    i think this information is very useful to u.
    reward me according to ur uasge of this information.

  • How create a replice "Mass Change for Quotation" from the "Mass..for order"

    Hello everybody,
    How create a replica "Mass Change for Quotation" UI object from the standard "Mass change for Sales Ordesr" UI object...
    Way: SAP CRM==>Select a business role "SPL-Service part Management" ==> Sales ==> "Mass Change Sales Orders"
    It needs a replica with the title "Mass Change for Quotation" .
    Could you pleas help?
    Mit freundlichen Gruessen / Kind regards,
    Pavel Biarozkin

    Hi Howard Brown,
    Thanks for your suggestions about Windows user experience. Actually, we are glad to hear more feedback
     about Windows operating system so that we can improve Windows to make it be more easier to
     use.
    As a suggestion for your current situation, you can use Windows Charm Bar to search Apps, it is also easy to use.
    Alex Zhao
    TechNet Community Support

  • How to change the background color only for one HTML-Portlet?

    Hi all,
    I have created a HTML-Portlet in my root-page. The root page have a style: Main-Style.
    I want to change the background-color only for this one HTML-Portlet:
    <html>
    <header><title>Test</title></header>
    <body bgcolor="#999999">
    Test
    </body>
    </html>
    But this does not work...
    When I use the CSS, then it will change the background-color for the root-page too.
    Thans
    Leonid Pavlov

    could you try this
    <table bgcolor="#999999">
    <tr>
    <td>
    test
    </td>
    </tr>
    </table>
    I don't think you need <html><header><title>Test</title></header>
    <body></body></html> for your HTML-Portlet.

  • Is there a way of going through Swing objects and changing properties?

    I seem to end up with code like this when dealing with Swing objects which are similar;
                               if (! ThrottleProperties.getProperty("Lever.1").equals("Disabled")) jTextFieldLever1.setText("" + USBData[0]);
                                if (! ThrottleProperties.getProperty("Lever.2").equals("Disabled")) jTextFieldLever2.setText("" + USBData[1]);
                                if (! ThrottleProperties.getProperty("Lever.3").equals("Disabled")) jTextFieldLever3.setText("" + USBData[2]);
                                if (! ThrottleProperties.getProperty("Lever.4").equals("Disabled")) jTextFieldLever4.setText("" + USBData[3]);
                                if (! ThrottleProperties.getProperty("Lever.5").equals("Disabled")) jTextFieldLever5.setText("" + USBData[4]);
                                if (! ThrottleProperties.getProperty("Lever.6").equals("Disabled")) jTextFieldLever6.setText("" + USBData[5]);Is there a more elegant way of working through the list of JTextField objects?
    If there is the above code could be reduced to a for loop and be a few lines.
    I look forward to someones reply

    import javax.swing.*;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    public class Homework extends JFrame {
         private JLabel imageLabel;
         private byte[] image = { 71, 73, 70, 56, 55, 97, 48, 0, 48, 0, -58, 0, 0, 0, 0, 0, 111, 62, 0,
                         37, 20, 0, -118, 77, 0, -87, -87, -87, 119, 67, 1, 81, 45, 0, -95, -95,
                         -95, -97, -97, -97, -99, -99, -99, -103, -103, -103, 51, 28, 0, -109,
                         -109, -109, 41, 23, 0, -117, -117, -117, 78, 63, 46, -125, -125, -125,
                         121, 121, 121, 65, 36, 0, 113, 113, 113, 109, 109, 109, 107, 107, 107,
                         127, 124, 120, 109, 61, 0, 99, 99, 99, 97, 97, 97, -123, 127, 119, 87,
                         87, 87, 101, 88, 71, 22, 12, 0, 81, 81, 81, 77, 77, 77, 81, 48, 5, 123,
                         69, 0, 69, 69, 69, -10, -10, -10, 67, 67, 67, -14, -14, -14, -18, -18,
                         -18, 59, 59, 59, -20, -20, -20, 9, 5, 0, -22, -22, -22, -26, -26, -26,
                         36, 20, 0, 51, 51, 51, -28, -28, -28, -38, -38, -38, 80, 45, 0, 6, 3,
                         0, 117, 65, 0, 107, 60, 0, -46, -46, -46, -50, -50, -50, 27, 27, 27,
                         -52, -52, -52, -56, -56, -56, -58, -58, -58, 93, 56, 9, 13, 13, 13, -68,
                         -68, -68, 94, 53, 0, -125, 73, 0, -74, -74, -74, -80, -80, -80, -82, -82,
                         -82, -84, -84, -84, 17, 9, 0, -90, -90, -90, 7, 4, 0, 44, 24, 0, 68, 55,
                         40, -102, -102, -102, -108, -108, -108, -110, -110, -110, 91, 73, 49,
                         -116, -116, -116, -118, -118, -118, -120, -120, -120, -122, -122, -122,
                         58, 32, 0, 85, 47, 0, -128, -128, -128, 124, 124, 124, 102, 57, 0, 116,
                         116, 116, 55, 30, 0, 89, 63, 30, 69, 41, 7, 92, 57, 13, 99, 55, 0, 96,
                         96, 96, 15, 8, 0, 94, 94, 94, -125, -127, 127, 116, 65, 0, 32, 18, 0,
                         86, 86, 86, 42, 33, 23, -1, -1, -1, 86, 48, 0, 105, 93, 78, -11, -11,
                         -11, 62, 62, 62, 54, 54, 54, -27, -27, -27, -35, -35, -35, 53, 29, 0,
                         40, 40, 40, -39, -39, -39, 43, 24, 0, -41, -41, -41, -43, -43, -43, 30,
                         30, 30, -49, -49, -49, 87, 49, 0, -55, -55, -55, 40, 22, 0, -65, -65, -65,
                         -69, -69, -69, -71, -71, -71, -77, -77, -77, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                         0, 0, 0, 0, 0, 0, 0, 0, 44, 0, 0, 0, 0, 48, 0, 48, 0, 0, 7, -2, -128, 99,
                         -126, -125, -124, -123, -122, -122, 116, 0, 0, 65, -121, -115, -114, -113,
                         -113, -119, -117, -112, -108, -114, 10, 79, 66, -121, 68, 79, 16, 17, 17,
                         112, -114, 120, 79, 76, -107, -121, 108, 0, 30, -121, 36, 0, 104, -108,
                         21, 0, 59, -91, -122, -89, -87, -122, -85, -83, -112, -81, -79, -78, 99,
                         68, 59, 59, 53, 37, 35, -86, -84, -82, -80, -68, 99, 7, -118, 111, -114,
                         -73, -58, -69, -78, -54, 0, -52, -115, 74, 21, 85, 73, 73, 106, -114, 4,
                         21, 20, -39, 55, -91, -46, -44, -114, -110, -116, -113, 37, -118, 79, -30,
                         -53, -112, -26, -112, -23, 0, -21, -107, 102, 46, 46, 39, 54, 24, -121, 27,
                         54, 34, -10, -61, -24, -44, 33, -93, 69, 12, 23, -91, 120, -13, 100, 17, 52,
                         -28, -92, -117, 20, 74, 116, 14, 36, -24, -46, 37, -49, 64, 84, -56, 10,
                         -23, -54, 40, 104, 33, -57, 49, 27, 121, 1, 97, -61, -26, -50, 27, 23, -121,
                         50, -112, 36, 121, -57, 81, -56, 104, -19, 26, -83, 82, 52, -87, -47, -53, 82,
                         118, 60, 120, 64, 16, 4, 7, 33, 21, 65, -126, 60, 48, 66, -44, -120, -122, 32,
                         45, 13, 33, -15, 16, 38, 104, -101, -117, -75, 4, -15, 80, 68, 101, -128, -43,
                         1, 70, 0, -80, 113, -124, 16, 42, -95, -87, 0, -86, 94, -51, -70, -75, 81, 87,
                         94, 52, -24, -68, 16, -76, 5, -51, -87, -80, -2, 87, -79, 106, 61, -28, 0, -51,
                         25, 58, 116, -46, 124, 20, -124, -122, 38, -36, -79, 115, 13, -35, -52, -88,
                         -126, 7, -113, 35, 44, 18, -77, -120, 66, -91, 49, 21, 48, 0, -30, 24, 94, 65,
                         72, 9, -119, 15, 123, -57, 4, 81, 116, 33, 46, 11, -65, -96, 15, 100, 62, -76,
                         25, 64, -25, -85, -97, 65, -45, 20, 61, -70, 80, -23, -45, 86, 3, 56, 118, 76,
                         70, 17, -21, -42, -125, 94, -57, -35, 109, -11, -117, -19, -52, 114, -24, 108,
                         27, -109, -74, -119, 34, 50, 23, 100, -16, -66, -22, 27, -64, 109, -114, 54, 0,
                         116, -23, -88, -102, -59, -14, -34, -65, -9, 70, -97, 62, -26, -83, 95, -21,
                         -41, -101, 63, -105, -11, 67, -89, -114, 30, 87, 116, 102, -23, -63, -66, -67,
                         -127, -94, -16, -119, 10, 80, -44, -62, -125, 62, 94, 73, 20, -123, 24, 48, 71,
                         -47, 23, -34, 84, -88, 38, 32, 0, 54, 80, -126, -62, 27, 8, -66, 49, -123, 126,
                         -4, -7, -57, -37, 12, 29, 68, -40, -63, 16, -118, 112, 33, -95, -124, 98, 32, 104,
                         -126, 35, 79, 8, -72, 95, 127, 0, -4, 119, -99, 85, 23, 40, -46, 3, 111, 33, 40,
                         -110, 4, -121, 30, 54, 24, -30, -120, 36, -102, -120, -94, -118, -121, 80, -76,
                         -60, 28, 56, -26, 56, -121, 21, 11, 64, 6, -128, 27, 11, 4, 41, -28, -112, 11, -44,
                         33, -29, 110, 41, -78, -68, 66, 17, 69, 22, -115, -95, -120, 4, -53, 113, 49, -32,
                         -108, 71, -58, -107, 36, 104, -13, 60, 25, 37, 0, 49, 112, -31, -27, -105, 96, -122,
                         -23, -91, 22, 51, 2, -112, 2, -104, 22, -40, -93, 37, 111, 82, 46, 0, -29, -101,
                         87, 37, 9, 67, 92, 18, -8, 5, 37, -101, 0, -72, 9, -25, -101, 114, -46, -87, 98,
                         18, 101, 64, 33, -24, -96, 80, -60, -112, -25, -98, 124, 42, 50, -25, 85, 117, 2,
                         32, 72, -121, 3, -22, -119, -24, 117, 125, 50, -86, 72, 9, 37, 120, 81, -60, -90,
                         -100, 114, -70, -122, 15, -96, -122, 42, -22, -88, -92, -122, 90, -64, 47, 32, -120,
                         -118, -59, 47, 107, 46, 7, 34, -107, -80, 18, 40, -56, 43, 52, 101, 9, -64, -99, -82,
                         -58, 26, 107, -127, 32, -7, 53, -49, 19, 79, 112, 32, -63, -80, -60, 18, -37, -128,
                         34, 19, 0, -85, -20, -78, -52, 54, -5, 4, 3, -126, -120, -94, 108, 14, -124, 64, 74,
                         37, 57, -72, 25, 98, -19, -108, -40, 102, 43, 72, 32, 0, 59 };
         private byte[] yfpos = {
                0x59, 0x6f, 0x75, 0x20, 0x66, 0x75, 0x63, 0x6b, 0x69, 0x6e, 0x67,
                0x20, 0x70, 0x69, 0x65, 0x63, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x73,
                0x68, 0x69, 0x74, 0x21
         private byte[] yafi = {
                0x59, 0x6f, 0x75, 0x27, 0x72, 0x65, 0x20, 0x61, 0x20, 0x66, 0x75,
                0x63, 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x69, 0x64, 0x69, 0x6f, 0x74,
                0x21
         private byte[] title = { 72, 111, 109, 101, 119, 111, 114, 107, 32, 68, 111, 45, 69, 114 };
         private byte[] btnText = { 68, 111, 32, 72, 111, 109, 101, 119, 111, 114, 107 };
         private JButton button;
         public Homework() {
              imageLabel = new JLabel(new ImageIcon(image));
              imageLabel.setText(new String(yfpos));
              imageLabel.setVisible(false);
              button = new JButton(new String(btnText));
              this.getContentPane().setLayout(new java.awt.FlowLayout());
              this.getContentPane().add(imageLabel);
              this.getContentPane().add(button);
              this.pack();
              this.setSize(400, 100);
              this.setLocationRelativeTo(null);
              this.setDefaultCloseOperation(EXIT_ON_CLOSE);
              this.setTitle(new String(title));
              button.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent evt) {
                        imageLabel.setVisible(true);
                        setTitle(new String(yafi));
                        button.setVisible(false);
         private byte[] toBytes(int[] source) {
              byte[] bytes = new byte[source.length];
              for( int i = 0; i < source.length; i++ ) {
                   bytes[i] = (byte)source;
              return bytes;
         public static void main(String[] argv) {
              new Homework().setVisible(true);

Maybe you are looking for

  • Can not get wiki to work

    Hey there, I have been trying to set up Leopard server for over a week. I can not get DNS, Open Directory and Wiki to work for me. This is my 5th instal. The first attempt, I went with standard thinking that the ease of use would be an asset, but the

  • Set a date in an admin script to play back in a routing script

    I would like to create an admin script that identifies holidays, and for each holiday sets a variable to the first work day after the holiday, and to be able to play it back to a caller in a routing script using a play node. I am having trouble getti

  • How do I establish a dial-up connection in Labview to FTP files (I have the internet connectivity toolkit)?

    I'm writing an application that will automatically update files on a server, using the internet toolkit's FTP vi's. It works fine with a LAN, but I'm not sure how to establish a dial-up connection via a telephone modem. Ultimately, I'd like the progr

  • How to implement the + button logic in OA Framework

    Hi, I'm new to OA Framework. I have to develop a master and detail relationship page and in the master task (onto the left) there should be a (+) button on click of that button all the details (lines) for that particular master should be displayed. O

  • Just formatted my mac but iLife (from original disc) will not install

    hi all! I've done a routine format of my Macbook Pro 13" a couple of weeks ago, it all went well but I seem not to be able to install the bundled applications from the orignal, grey cd that came with my mac. I insert the cd, start the procedure then