My Swing component's style is changed!

Hi all. I am using Linux openSuse and from a week I see that my swing component's style is changed! JButton, JPanel, JMenu, JCheckBox and other have a different style and I don't know why... this is an example: http://img527.imageshack.us/img527/715/screen1lg1.png
How can I return on the original swing component's style? Please help :(

Anybody can help me? :'(

Similar Messages

  • Changing custom AWT component to Swing component

    I created my own AWT component. I'd like to change it to Swing component.
    Does anyone know how to change or create a custom Swing component?
    Please also provide some framework to develop a custom Swing component.

    First try to know the difference between SWING & AWT. You can either adopt to SWING or AWT but be specific of what you want to do !
    If you like to migrate from AWT to SWING ,then make the necessary changes in your coding.(ie, re frame things like , Frame to JFrame , Button to JButton ,JTextField to JTextField etc..)
    For creating custom components ,say a component called MyLabel and you should design a class which extends JLabel and do whatever you like...
    eg import javax.swing.*;
    public class MyLabel extends JLabel
      MyLabel(String title)
         this.setTitle(title);
         this.setBackground(Color.white);
         this.setForeground(Color.blue);
    }For more details go to java tutorials.

  • Support for Multilingual Numeral Input in JTextField swing component

    When the User Locale is changed from the regional & language options in the control panel and the standard digits are customized to a non Latin character set, all the windows applications adhere to the changes made. HTML also respects the changes in effect and displays any numeric values using the new character set, which are the national digits for many Eastern Locales such as Chinese, Arabic(Saudi Arabia), Urdu and many more. The JTextField swing component given by java, however, does not show any support to the new settings. Any numeric input is displayed in the Latin character set even when the input locale of the system is also changed respectively. Any text input for this case is correctly displayed in the desired literals and appropriate glyphs. However, unlike the AWT components, numeral input and display is not catered as per the user/developer's requirements. This behavior was first noticed in 2007, as far as i have found out, and was reported once again on the same thread in 2010. The thread is given below as a reference. No action or response has been taken. Kindly look into this matter and please let me know if this bug has been reported before and if there is any intent of providing a fix for it.
    Reference: http://www.coderanch.com/t/344075/GUI/java/Multilingual-support-JTextField
    Regards,
    Aitzaz Ahmad
    Software Engineer
    SENSYS

    I too had an itch to reply with something like this
    This is a sign of work well done!
    The WD has so strong UI abstraction, that hides client-server nature applications almost completely. If you search forum, you will even find posts where developers try to upgrade value of ProgressMeter in <b>for</b> loop )
    VS

  • Can't add to JPanel after removeAll() is triggered by another swing compone

    Consider the bit of code below. It's a much simplified version of my real app.
    In jPanel1 is a single label. In jPanel2 is a single button.
    The button in jPanel2 is supposed to wipe clear (with removeAll()) jPanel1 and add a new label in place of the old one. What actually happens is that after the first button press, jPanel1 is indeed cleared by the removeAll() method but the new label can't be added (or rather it can be added but won't show.) I can hard code the removal & addition back and forth all day & it works fine. It's just when I use a swing component like JButton or JComboBox that it doesn't work. Why?? Is this a thread thing? (I know I can just change the text of the label but the real app is much more complicated.)
    package my.stuff;
    import java.awt.*;
    import javax.swing.*;
    public class TreeTest3 extends javax.swing.JFrame {
         private String language = "english";
         public TreeTest3() {
              initComponents();
              jPanel1.setLayout(new FlowLayout());
              jPanel1.setVisible(true);
              changeLabel();
         private void changeLabel()
              System.out.println("language = " + language);
              jPanel1.removeAll();
              jPanel1.validate();
              jPanel1.add(new JLabel(language), "Center");
              repaint();
         @SuppressWarnings("unchecked")
            // <editor-fold defaultstate="collapsed" desc="Generated Code">
            private void initComponents() {
                    jPanel1 = new javax.swing.JPanel();
                    jPanel2 = new javax.swing.JPanel();
                    jButton1 = new javax.swing.JButton();
                    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
                    jPanel1.setBorder(new javax.swing.border.MatteBorder(null));
                    jPanel1.setPreferredSize(new java.awt.Dimension(400, 204));
                    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
                    jPanel1.setLayout(jPanel1Layout);
                    jPanel1Layout.setHorizontalGroup(
                            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGap(0, 398, Short.MAX_VALUE)
                    jPanel1Layout.setVerticalGroup(
                            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGap(0, 133, Short.MAX_VALUE)
                    jButton1.setText("switch");
                    jButton1.addActionListener(new java.awt.event.ActionListener() {
                            public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jButton1ActionPerformed(evt);
                    javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
                    jPanel2.setLayout(jPanel2Layout);
                    jPanel2Layout.setHorizontalGroup(
                            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                    .addContainerGap()
                                    .addComponent(jButton1)
                                    .addContainerGap(308, Short.MAX_VALUE))
                    jPanel2Layout.setVerticalGroup(
                            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                    .addContainerGap()
                                    .addComponent(jButton1)
                                    .addContainerGap(126, Short.MAX_VALUE))
                    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
                    getContentPane().setLayout(layout);
                    layout.setHorizontalGroup(
                            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    layout.setVerticalGroup(
                            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    pack();
            }// </editor-fold>
         private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
              if (language.equals("english")) language = "spanish"; else language = "english";
              changeLabel();
         public static void main(String args[]) {
              java.awt.EventQueue.invokeLater(new Runnable() {
                   public void run() {
                        new TreeTest3().setVisible(true);
            // Variables declaration - do not modify
            private javax.swing.JButton jButton1;
            private javax.swing.JPanel jPanel1;
            private javax.swing.JPanel jPanel2;
            // End of variables declaration
    }

    It should be
                    private void changeLabel()
              System.out.println("language = " + language);
              jPanel1.removeAll();
              jPanel1.add(new JLabel(language), "Center");
              jPanel1.revalidate();
              jPanel1.repaint();
         }

  • How to embed swing component into javaFX ?

    Maybe I missed sth, but can someone explain us how can we embed swing component into javaFX 2.0 ?
    This was previously handled with javaFX "srcipt", why can't we do it anymore ?
    As far as the work to migrate from 1.3 to 2.0 is hard and huge, why do fx2.0 do not offer such feature anymore ? :(
    I know that ThingFx project try to cope with, but the current code doesn't match with my needs.
    Thanks for help,
    Edited by: tibO on 23 nov. 2011 14:35

    I know this post is old and the original authors might not even ben active; but it essentiall gets to the heart of what I'm trying to.
    I have a JDialogBox. In it I have a panel (which I have to change to a JScrollPane). Inside the JPanel I have a JLabel and a JTextArea.
    I was told to; make it scrollable in the event that there is too much info for the JDialogBox and to add HTML formatting (simple stuff like bold and colors.
    1) The JScrollBar doesn't seem to produce the scroll side bars.
    2) I must not be implementing the JEditorPane correctly. I just substituted JEditorPane for JTextArea in my code and it returned a type converstion error. Is JEditorPane even the correct object to use? Should I be using JTextPane?
    The reason I can't do this on a JLabel by JLabel basis is because I don't know how many labels I will need at each runtime. And I also have to have a swingtimer on it. I could create an array and loop around it to create the JLabels. But it seems a waste of commuting cycles. This is no good?

  • New: awt is covering my swing component...

    i am using both awt and swing component on the same page. They are a List and a JComboBox.
    while the JcomboBox is placed above the List. it works fine but when i click on the JComboBox, the pull down menu is covered by the awt List. I know that using JList can solve the problem, but i'm new to swing and i just want to make the smallest change to my code.
    can i use layeredpane to help?

    here is a link to the Swing tutorial that mentions this problem:
    http://java.sun.com/docs/books/tutorial/uiswing/start/swingIntro.html#awt
    The Swing tutorial also has a section on converting from AWT to Swing. You should look at that.
    Here is another article from the Swing Connection titled "Mixing Heavy and Light Components"
    http://java.sun.com/products/jfc/tsc/articles/mixing/index.html
    Like the previous post says, you are better off not to mix the two.

  • Swing component's opaque property

    Recenetly I read an article about "Painting in AWT and Swing" and feel confused about some points in the article.
    http://java.sun.com/products/jfc/tsc/articles/painting/index.html
    The article mentioned several Swing Painting Guidelines, I have question about the following two paragraphs:
    6. If a Swing component's opaque property is set to true, then it is agreeing to paint all of the bits contained within its bounds (this includes clearing it's own background within paintComponent()), otherwise screen garbage may result.
    7. Setting either the opaque or optimizedDrawingEnabled properties to false on a component will cause more processing on each paint operation, therefore we recommend judicious use of both transparency and overlapping components.
    For the No.7, it's said setting the opaque to false will cause more process on each paint operation, I think it should changed to ture, since if set opaque property to true, it will paint all the bits contained within bounds as described in No.6.
    So is this an error? What on earth is efficient for the opaque property value?
    Thanks!

    For the No.7, it's said setting the opaque to false will cause more process on each paint operationWhen you create an application you do something like this:
    create a frame
    add a panel to the frame
    add a component to the panel. (lets say a JButton)
    When you click on a button you need to change the state of the button to look 'pressed'. So you need to repaint area on the screen where the button is painted.
    If the button is opaque(true) then you simply paint the button in its new state because the button is responsible for painting its background and any custom painting.
    if the button is opaque(false) then you don't paint the background which means you need to search for the parent of the button (in our example the panel). Once you find the parent you need to paint that area of the panel that the button overlays and then you do the custom painting of the button.
    So either way you have to repaint the same area. Hopefully it makes sense that painting a single component would be more efficient than painting parts of two separate components and determining which two components to repaint and what area to repaint of each component.

  • Help-using document as a java swing component

    Hi,
    can i use a document excel file or a doc file as a swing component.
    i have few templates in in excel and .doc format.
    i use them to produce bills by just entering data.
    Now i want to develop a swing application and use the same templates in jpanel or jtextpane or jeditorpane.
    its very hectic to make templates in swing using tables and all.
    is there any api which can help me out???
    thanks

    as a Swing component? No.
    There's probably libraries for reading those types of files, and maybe displaying them. POI, perhaps?

  • [Basic Paragraph] style name change to NormalParagraphStyle?

    i m trying to edit existing paragraph style. i was do it through kEditTextStyleCmdBoss. My problem is : As the command is process the name of [Basic Paragraph] style is changed to NormalParagraphStyle and it is now editable. How i can make its name field again not changable(i.e. preserve its original property)?
    Regards
    Kannu

    Hi,
    Have you some solution?
    Best regards:
    Karoly

  • Swing component's margin in a frame

    Hello all,
    When you set the bounds of a Swing component in a frame, it will automatically apply those bounds to the VISIBLE part of the frame, so that, a Y value of 0, for example, will not be at the very top of the frame, but right underneath the title bar of the frame. If you give a regular AWT a value of 0 to it's Y coordinate, part (or all) of it will be covered by the title bar of the frame. This does not happen with Swing components, which automatically add the height of the title bar to the value you give to their Y coordinate.
    Now, what I want to know is, how can I retrieve the value of that "automatic margin"?. How can I know the number of pixels that the Swing component is being slided down, in order to save the title bar of the frame? This value can not be constant, since it will differ from one platform to another, and from one Look 'n Feel to another, but I have not been able to find out the way to get the value that it's being applied in each case.
    As allways, many thanks in advance for your help.

    Don't know if there is any direct way to get this information. But, assuming the border width/height is equal on all four sides you could try something like:
    Dimension frameD = frame.getSize();
    Dimension contentD = frame.getContentPane().getSize();
    int borderWidth = frameD.width - contentD.width;
    int titleHeight = frameD.height - contentD.height - borderWidth;

  • How to set a Swing component as Modal window on a SWT Component.?

    How to set a Swing component as Modal on a SWT Component.I mean, I have a window (SWT Container) with some menu items.
    When I click on one menu item then i will get one new Swing Window.
    When creating the new frame I had passed Modal value as TRUE in the constructer.Now child is not behaving as Modal Window.I mean I am able to go to parent window even though the child window is opened as a Modal Window.This is only happened when I double click on the Title Bar of the Parent Window.
    If I try to click on any other part of the Parent Window except Title bar ... the child window is working as a Modal Window.
    Can any one suggest me to solve this one !!

    int this case, do this :
    JFrame f = new JFrame("Authentification");
    f.getContentPane().setLayout(new BorderLayout());
    f.getContentPane().add(myJPanel, BorderLayout.CENTER);
    f.setBounds(x,y,w,h);
    f.setVisible(true);
    Where myJPanel is the Panel you developped.

  • How to set a Swing component as Modal on a SWT Component?

    How to set a Swing component as Modal on a SWT Componen?.I mean, I have a SWt Component window and from that window I am displaying a SWING Component Modal window.
    The problem is my swing window is not working as Modal always.
    When I opened the swing window from SWT window,swing window is working as Modal.But if Idouble click on Menubar or Title bar of the SWT Window then my Swing window goes back.If I click on any other part of the SWT window.. then once again Swing window is working as modal.
    Can any one suggest me to solve this?
    I think this is isuue related with Swing over SWT..

    pradeep.rajadurai wrote:
    I want set the JTable as a background of jframe or jinternalframe , how it is possible One way that may work, you can always extract the image from a rendered JTable and then paint the same image into the JPanel that holds your components via it's paintComponent method, then added the JPanel to the app's contentPane.
    give me simple pgmIs English your second language? Because if so, please understand that this demand can be taken by some as rude.

  • Master Style page changing/deleting images

    Hi all -
    This has been a reoccurring problem for quite some time. I have several master style pages in my project; each one is laid out the same with my company's logo and a module name in a header, then a copyright in the footer. While working, I'll get a prompt that says the master style has changed and needs to be reapplied to all the connected pages. This would be self-explanatory if I were editing the headers/footers while working -- But I'm not. Only the page content.
    It's always my company's logo that disappears from the header when this happens. This is the prompt I get:
    This happens no matter what master style the page I'm working on might have.
    (It just happened now and I didn't change anything in the headers or footers.)
    Please help.
    Thanks!
    Erin

    Indeed, there is a table in the Master page header, and the graphic goes in that table.
    However, the edit to the TD tag was in a topic to which the Master was applied, not to the Master itself. IIRC, when editing a topic, you cannot edit the master page that is associated with it.
    <i>Are you by chance also using the Resource Manager to manipulate or coordinate the company logo? One thought was that if you are, perhaps something about the checking/updating process with the Resource Manager is causing an issue.</i>
    I'm not using the Resource Manager. The image is fully cropped and edited in PNG format before I place it, using the little picture icon. It then shows up in the Project Manager.
    <i>But if you see a hummingbird signature on the radar along with a cold front producing a storm, you will always pay more attention to the storm than the hummingbird, no?</i>
    I'd be so fascinated with the hummingbird I'd stay out in the rain to watch it. But that's just me.
    Glossary text can be formatted in the Style Pod. Is that not the requirement?
    I cannot bold or italicize glossary entries at a character level.
    Just for fun, here's the Master Page code (company name replaced with [company]:
    <?xml version="1.0" encoding="utf-8" ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="topic-comment" content="" />
    <meta name="generator" content="Adobe RoboHelp 10" />
    <title>default_master</title>
    <link rel="StyleSheet" href="Admin\default.css" type="text/css" />
    </head>
    <body>
    <?rh-script_start ?><script src="ehlpdhtm.js" type="text/javascript" language="JavaScript1.2"></script><?rh-script_end ?>
    <?rh-region_start type="header" style="width: 100%; position: relative;" ?>
        <table style="border-collapse: collapse;" cellspacing="0" width="100%"
                 bgcolor="#B21E16">
            <col style="width: 64.352%;" />
            <col style="width: 35.648%;" />
            <tr>
                <td style="vertical-align: center; padding-left: 1px; padding-top: 1px;
                     padding-right: 1px;"><p class="Title"><?rh-udv_start name="doc_title" ?>DeepSee Administration Guide<?rh-udv_end ?>
                 </p></td>
                <td style="vertical-align: bottom; padding-left: 1px; padding-top: 3px;
                     padding-right: 1px;"><p style="text-align: right;"><img
                 src="Admin/white_trans_.5in.png" alt="[company]_logo" style="border: none;
                 margin-left: 2px; margin-right: 2px; margin-top: 4px;" border="0" /></p></td>
            </tr>
        </table>
        <br />
        <?rh-placeholder type="breadcrumbs" ph-align="2" usetopicformat="1"
         home="Home" sep-char="&#160;&gt;&#160;" ph-style="font-family:Verdana;font-size:12pt;font-weight: normal;font-style: normal;text-decoration: none;" ?>
    <?rh-region_end type="header" ?>
    <?rh-region_start type="body" ?>
        <p>&#160;</p>
    <?rh-region_end type="body" ?>
    <?rh-region_start type="footer" style="width: 100%; position: relative;" ?>
        <p style="font-size: 8pt; font-style: italic; color: #b32017; text-align: center;">©
         <a href="javascript:BSSCPopup('Admin/Admin/Admin/Admin/Admin/copyright.htm');"
             id="a1">2012 [company]</a></p>
    <?rh-region_end type="footer" ?>
    <?rh-script_start ?><script type="text/javascript" language="JavaScript1.2">//<![CDATA[
        if( typeof( FilePopupInit ) != 'function' ) FilePopupInit = new Function();
        FilePopupInit('a1');
    //]]></script><?rh-script_end ?>
    </body>
    </html>
    And here's the topic. The table that I edit to produce the error is styled as "data," but the table in the Master page is not styled at all.
    <?xml version="1.0" encoding="utf-8" ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="Content-Language" content="en-US" />
    <meta name="topic-status" content="In Progress" />
    <meta name="template" content="default_master.htt" />
    <meta name="build tags" content="Admin" />
    <meta name="generator" content="Adobe RoboHelp 10" />
    <title>Capture</title>
    <link rel="stylesheet" href="default.css" type="text/css" />
    </head>
    <body>
    <?rh-script_start ?><script src="../ehlpdhtm.js" type="text/javascript"
                                 language="JavaScript1.2"></script><?rh-script_end ?>
    <?rh-placeholder type="header" ?>
    <h1>Capture</h1>
    <p>The interfaces are displayed below the iGraph. There is a separate box
    for each interface on the [product].</p>
    <p>&#160;</p>
    <p><img src="../gfx/138-interfaces.png" alt="" style="border: none;" border="0" /></p>
    <p>&#160;</p>
    <table class="data" cellspacing="0" width="100%">
        <col style="width: 6%;" />
        <col style="width: 94%;" />
        <tr>
            <td class="t1st" style="border-right: Solid 1px #000000; border-bottom: Solid 1px #000000;
                 vertical-align: Bottom;"><p class="table_text" style="text-align: center;">1</p></td>
            <td style="border-bottom: Solid 1px #000000; vertical-align: Bottom;"><p
                 class="table_text"><span>Interface speed</span></p></td>
        </tr>
        <tr>
            <td class="t1st" style="border-right: Solid 1px #000000; border-bottom: Solid 1px #000000;
                 vertical-align: Bottom; padding-right: 8pt;"><p class="table_text"
                                                                 style="text-align: center;">2</p></td>
            <td style="border-bottom: Solid 1px #000000; vertical-align: Bottom;"><p
                 class="table_text">Line color on iGraph</p></td>
        </tr>
        <tr>
            <td class="t1st" style="border-right: Solid 1px #000000; border-bottom: Solid 1px #000000;
                 vertical-align: Bottom;"><p class="table_text" style="text-align: center;">3</p></td>
            <td style="border-bottom: Solid 1px #000000; vertical-align: Bottom;"><p
                 class="table_text">Click to apply a capture filter; see <span
             style="background-color: #00ffff;">Capture Filters</span> for
             more information</p></td>
        </tr>
        <tr>
            <td class="t1st" style="border-right: Solid 1px #000000; border-bottom: Solid 1px #000000;
                 vertical-align: Bottom;"><p class="table_text" style="text-align: center;">4</p></td>
            <td style="border-bottom: Solid 1px #000000; vertical-align: Bottom;"><p
                 class="table_text">Toggle to enable/disable representation
             on iGraph</p></td>
        </tr>
        <tr>
            <td class="t1st" style="border-right: Solid 1px #000000; border-bottom: Solid 1px #000000;
                 vertical-align: Bottom;"><p class="table_text" style="text-align: center;">5</p></td>
            <td style="border-bottom: Solid 1px #000000; vertical-align: Bottom;"><p
                 class="table_text">Toggle to start/stop data capture</p></td>
        </tr>
        <tr>
            <td class="t1st" style="border-right: Solid 1px #000000; vertical-align: Bottom;"><p
                 class="table_text" style="text-align: center;">6</p></td>
            <td style="vertical-align: Bottom;"><p class="table_text">Interface
             name: <span style="font-weight: bold;">eth</span>—Ethernet;<span
             style="font-weight: bold;"> ift</span>—time-replay mapping;<span
             style="font-weight: bold;"> ifm</span>—merged mapping</p></td>
        </tr>
    </table>
    <p>&#160;</p>
    <p>Each interface box shows a table with the following columns:</p>
    <?rh-list_start class="rl-p-bullet" an="1" level="1" style="list-style: rh-list;
                     list-style: rh-list;" ?><p class="bullet"><span style="font-weight: bold;">Type</span>—Current,
    maximum, and total. </p><?rh-list_end ?>
    <?rh-list_start class="rl-p-bullet" an="1" level="1" style="list-style: rh-list;
                     list-style: rh-list;" ?><p class="bullet"><span style="font-weight: bold;">Captured</span>—Total
    amount of data captured by this interface. </p><?rh-list_end ?>
    <?rh-list_start class="rl-p-bullet" an="1" level="1" style="list-style: rh-list;
                     list-style: rh-list;" ?><p class="bullet"><span style="font-weight: bold;">Filtered</span>—Amount
    of filtered data captured by this interface.</p><?rh-list_end ?>
    <p>&#160;</p>
    <?rh-placeholder type="footer" ?>
    <?rh-script_start ?><script type="text/javascript" language="JavaScript1.2">//<![CDATA[
    //]]></script><?rh-script_end ?>
    </body>
    </html>

  • Swing component for awt.canvas

    Hi,
    Can anyone tell me the equivalent SWING component for awt CANVAS. I need it because i need to display only Images (nothing else) on it. If anyone can tell how I can do it.

    JPanel is the Swing-equivalent of java.awt.Canvas, but if you are just displaying images, you can use the JLabel class, which supports use of images as icons (see also ImageIcon class).
    Mitch Goldstein
    Author, Hardcore JFC (Cambridge Univ Press)
    [email protected]

  • Swing component fires an event to non-GUI code

    Hi all -- this is my first post in forums.sun.com.
    Question to get me started -
    I have a Swing component that fires an ActionEvent. I would like that ActionEvent to trigger code that does not run on the AWT Event Queue thread (some code that will take some time without impacting GUI rendering performance.)
    I know I could put that Event's action command into a synchronized Queue, and have a worker thread checking the queue and taking action when it finds a command there. Likewise, I could flag a volatile boolean as true, and have a worker thread check the flag and take action when true.
    Or (and I suspect this is best), I could create a new SwingWorker thread right in actionPerformed().
    Any opinions on what makes sense?

    pkwooster: Yep. That's what I meant.
    As for the design pattern, Observer was the pattern I was intending to use (and have already implemented). Would anyone argue that another method is more efficient or "correct"?
    My sample project is:
    Business Object -> Main Dialog -> Embedded Dialog
    The Main Dialog contains no business logic - just simple navigation events. The Embedded Dialog contains the real controls and reports any interaction using Swing events, which the Main Dialog picks up.
    I then set up the Observer pattern between the Main Dialog and the Business Object.

Maybe you are looking for

  • How do I delete my old apple account,it's not accepting my birthdate either?

    How do I delete an old apple account?  For some reason it's not accepting my birthdate information!  Thank -you!

  • ECC 6.0 Client copy

    Hi all Recently i Loded my system with SAP ECC 6.0 IDES. But Country Setting Screen, Tax procedures ( TAXINN, TAXINJ) are not activated. and also i am facing problem in activating New GL function. If any body know the solution please share with me .

  • Error message adobe reader 11

    adobe reader could not open tif file becuase it is either not a supported file type or because the file has been damaged. same error message recieved for adobe reader 9 & 11 please help

  • Viewing Publishing From Different Computers

    Am creating pages using iWeb on one computer and want to work on them on another before uploading to my own hosting url. I do not see the "import" opportunity, and I published it to my .mac account thinking I could then view it on a different compute

  • OIM Integration with LotusDomino

    Hi, While provisioning the userA data from OIM to LotusDomino the userA contains the Email address, and if the UserB also have the same name as of UserA then there will be collision in E-mail id's. How OIM or we need to take care that the e-mail name