Awt swing 1.1

Hi,
Where can I actually download AWT swing 1.1 package to run with jdk 1.1.?

http://java.sun.com/products/archive/jfc/1.1.1/index.html

Similar Messages

  • AWT/Swing gui flickering

    I am trying to add the swing JDesktopPane to java.awt.Frame .The JDesktopPane includes
    JInternalFrame.The problem is that the GUI is flickering when resized or moved.
    I migrated from jre1.4 to jre1.5 and the flickering of the JDesktopPane stops but the
    JInternalFrame is still flickering when resized/moved.I am wondering if at this point
    this is a AWT/Swing issue.

    Never ever mix AWT and Swing!At least not their components. :p ;)

  • A new AWT/Swing?

    I have a question for the community.
    IMHO, and I am not alone, AWT/Swing have major flaws that really ought to be fixed. Probably, because the APIs themselves are seriously flawed, what is required is a replacement for Swing.
    How would one go about proposing such a thing and getting Sun's support?
    Specific issues:
    1) A set of specific design rules should be codified, which all conforming components, layout managers, UIs, etc., should obey. Along with the rules, there should be automated tests, so that it could be confirmed whether components, layout managers, UIs, etc., work correctly.
    Currently, Swing and 3rd party components often do not work well together, for reasons such as
    a) Highly irrational behavior of layout managers. Currently, none of the AWT/Swing layout managers behave in a reasonable way under all circumstances, with the possible exception of BorderLayout. Also, layout managers use constraints in inconsistent ways, and they are ill-suited to control by GUI builders.
    b) Failure to use minimumSize, preferredSize, and size consistently.
    c) Inconsistent use of UIs. What is the division of responsibility between the UI, layout managers, L&F, and the main class(es)?
    2) Software design rules. For example, there is currently at least one Swing class that alters its behavior depending on which container it is placed in. That violates basic principles of OO development. Perusing the AWT/Swing source code, you will find plenty of objectional coding practices. It seems that the pressure to maintain backwards compatibility has been a real impediment to "doing things right".
    3) Performance. AWT/Swing are notorious for various performance problems, including
    a) Non-linear CPU cost associated with building certain graphical data structures (combo-boxes, for one).
    b) Layout managers that call getMinimumSize or getPreferredSize on child components multiple times. Currently, the layout managers are the CPU bottleneck in many AWT/Swing GUIs.
    c) Some text components are almost unbelievably slow. Try scrolling a lot of text through a JTextArea and you will be disappointed.
    d) The current validation logic is extremely complex, inefficient, and undocumented. I count approximately 15 basic API methods that affect how and when components are repainted. I defy ANYONE to explain how it all works. The typical result is that repaints occur FAR more often than is necessary.
    A lot of optimization is required to fix these problems. That means automating tests, profiling, removing extra repaints, CPU bottlenecks, etc.
    4) Excessive complexity of the APIs. For example, it seems that building practical tables and trees is harder than it should be. The APIs are complex and documentation obscure or lacking in detail. Also, the separation between model and view is often tainted. It shouldn't be necessary to do so much conversion between model and view indices, for example. A basic set of model classes should be shared by all components that use underlying data models. These model classes should support standard functionality such as filtering, sorting, etc.
    5) No portable remote operation. Yes, I am familiar with SAWT (slow and buggy), and the possibility of using X11 remotely when the Java application is run on a *nix platform (slow over a high-latency network such as the Internet and unusable on Windows systems).  There does not seem to be a usable, universal solution.
    Yes, I am familiar with SWT. However, for a variety of reasons, I believe that the AWT approach is superior. SWT is more platform dependent and it has the X11 reverse-object-orientation in which child classes know about their parents. I have done some performance testing, which suggests that
    1) SWT layout managers are faster than their corresponding AWT/Swing managers
    2) Most other graphics, including 2D graphics, are faster in AWT/Swing than SWT.
    I am sure that SWT encapsulates some good ideas. However, it seems that if the efficiency of validation and layouts could be improved, then AWT/Swing performance would be excellent, while maintaining OO and platform-independent characteristics.
    Possibly, these issues could be worked out piecemeal. For example, a new, rational set of layout managers could be developed entirely independently.
    Other issues, such as defining how UIs, L&F, and component classes should be architected, are going to be more problematic. Creating order in the current chaos will be difficult.
    Any ideas?

    >
    How would one go about proposing such a thing and
    getting Sun's support?
    As for proposing such a thing, you can always become a member of the Java Community Process Program (it's free for individual members): http://www.jcp.org/en/home/index. As a member you can post a Java Specification Request with your suggestions. If you want to operate on a smaller scale you can report bugs to the bug database.
    As for getting Sun's support....well, good luck! :-)

  • Difference between AWT,Swing and swt

    Hello,
    I am giving a seminar about swing in which I need to point out differences between AWT,Swing and SWT(Software Widget Tool).
    I have two questions:
    1)I read that-A heavyweight component is one that is associated with its own native screen resource (commonly known as a peer). A lightweight component is one that "borrows" the screen resource of an ancestor-which makes it lighter.Can anybody explain What native screen resource is and how it is borrowed?
    2)I read that SWT uses native widgets and how can it be better than swing?If it is in what way?

    Use Swing for new projects. AWT is the rendering layer underneath Swing in many cases, and AWT provides utility things like Graphics. SWT is an alternative to Swing which used more native rendering, but actually with Java 6, Swing is using a lot of native rendering.
    Fire up NetBeans and use Matisse. Build an application. Run it under Windows, and then under Linux, and then realize how great it is.

  • Tutorial on AWT/Swing control flow

    Greetings all,
    Just wondering if any of you folks know of a good tutorial on AWT/Swing control flow? I'm doing some pretty complex stuff with a table whose editors call other windows and insert values into the table based on callback objects...weird stuff happening with loss of focus when the other windows come out, etc etc etc.
    I have it working via a series of what I consider kludges, but I would really like to implement it cleanly, and it's looking like that's going to require understanding <ugh> <grin>
    So it looks like it's time that I bit the bullet and got to grips with control flow in AWT/Swing. Is there a tutorial out there that could help me with this?
    Many TIA

    skiaddict1 wrote:
    Let's take your word for it, but if you have the slightest doubt please consider the subject: EDT violation is a classic here.OK sure, but I really don't think I'm violating it. I avoid multi-threading like the plague, and only introduced it for my report writer because I wanted to have a little window advising the user that the report was in the process of being written.Raise your left hand and swear this report writer is not running when you experience the problem you describe! >o(
    OK, this is just kidding, as per the rest of your description, it sounds reasonable now to assume that your problem is not related to EDT violation.
    I'm doing some pretty complex stuff with a table whose editors call other windows and insert values into the table based on callback objects...This summary is a bit worrying, and I thought you would mention problems in the display of the table being edited. But you seem to refer to problems in other windows, or did I misunderstand?
    Or do you mean, loss of focus in the editor still being edited? Can you please clarify what you do and what your problems are?
    In particular, what does the other windows come out mean?OK, I was trying to be sparse with details because I didn't think they were relevant.Actually the worrying seems all the more justified, now that you have described it more extensively: I was afraid that you would raise other windows while editing, and that's the case. I know little of focus though...
    I have a table in window A, one of whose columns has a custom editor which, when a cell in the column is double-clicked, registers itself with window B as a choice-listener (see later) then asks window B to come to the front. Window B, when the user performs a choice amongst the UI elements in there, fires a choice-event to its listener, i.e. the custom editor. At which point the editor saves away the chosen value (for use by getCellEditorValue()), sets the text in the cell appropriately, turns edit mode off via fireEditStopped(), and brings window A back to the front.
    (...) once the custom editor asks window B to come to the front, the table in window A loses focus and when it is brought back to the front, the table's JScrollPane seems to have the focus (visually, it has the focus rectangle around it). Pressing the Tab key has no effect on focus; you have to use the mouse to focus something.I assume you have read the tutorial on using tables in Swing.
    It contains an example where a custom editor is bringing up a dialog: http://download.oracle.com/javase/tutorial/uiswing/components/table.html#editor
    AFAIK, the example does not suffer from focus problems.
    What I am finding, and I reiterate this is new since I rewrote the windowing subsystem for the app (the custom editor was not changed in the rewrite), is that (...)Just what do you call "rewriting the windowing system" (just to rule out the possibility of something Ramboesque)?
    I have no idea why this loss of focus is occurring, and I am at a loss to begin to figure it out. As I wrote above, I have a series of kludges which gets around the symptoms, but I would really rather figure it out and fix it.OK I admit I cannot tell what happens exactly, but:
    1) instead of bringing window B to front, couldn't the editor bring up a dialog B (e.g. using JOptionPane.showXxxDialog() to bring up just the choice panel? The advantage is that it is more "synchronous", you can control when the window A's table model is updated.
    2) what worries me too is that you update the model of the table being edited while you're editing one cell of it? Would it be possible, and make sense in your case, to update this model later (that is, post the model update as an invokeLater(...) call)? I don't see how seeing the table updating underneath helps the user editing its cell, but you may have your reasons.
    What do you call flow control , or control flow in AWT/Swing?Basically, what I am after is something that will help me begin to understand/diagnose problems such as the above when they happen in my code. I am deeply averse to multi-threading (...) Things in my code were working, and that was enough for me.
    But the above behaviour, and another weird behaviour I was having last week, which again I have solved with what I consider a kludge, and again which only began with my new windowing subsystem, have caused me to realise that it's time I really got to grips with this issue.Yes, when they say beware of threads when using Swing , nobody tells to not use threads! Just to be aware of how special Swing is with regards to threads (at least, compared to AWT, that didn't make such warning).
    I would like, for example, to really deep-down understand exactly when listeners for AWT-Swing events get called. I don't really care so much when the events get put on the queue, but I do care when exactly my event handlers will be called. This will help me diagnose problems, I'm sure.Well they get called in the EDT, by some framework code that, in an infinite loop, does something along the lines of:
    - pop next event from the event queue
    - determine which is the target widget
    - let the widget transform the event and send it to all registered listeners
    Now with dialogs, things gets dimmer, because while a dialog is brought up (via a<tt>setVisible(true)</TT> call on the EDT, the EDT is indeed suspended, and a new event thread manages the events for the dialog).
    I'm sorry I have no reference for that behavior, and my description is certainly blurry (and possibly wrong), but I don't think your problem is so much related to threading as I initially thought.
    N.B.: Darryl's second link does features sequence diagrams that try to demonstrate what happen (in a specific example with asynchronous access, but you can derive the simpler, regular, working, from it).OK, yes I saw that diagram, I was offput by the asynchronicity but I will have another look tomorrow also. Thanks againDon't put too much hopes in there, indeed it's definitely not the kind of info I understand you're looking after.
    Much luck all the same, and feel free to come back with your findings, or with more questions, about the initial subject (reference on event flow) and the specific problem (your focus issues with the editor).
    I also cannot end this message without suggesting that you try to reproduce the problem with an SSCCE (http://sscce.org), that you could post here for us to try out. See this recent discussion about the multiple interests of this approach: {message:id=9587964}
    Best regards,
    J.

  • AWT/Swing in JSP

    Can we use Abstract Window Toolkit(AWT) or Swing classes in JSP? If is it so, is it preferable to use those in jsp?
    Details are welcome.
    Thanks

    Yes and no. It really depends what you are talking about. There is less than no point trying to run any of the AWT windowing stuff because you are not generating a Java front end you are generating an HTML front end. Java UI components would just not work in that context- the UI would only appear on the Server, not on the client side. Unless you wrote it as an applet, at which point it has nothing to do with jsp and becomes and applet programming question.
    If you are talking about the image processing APIs then yes, I have used those and it was quite tricky because I was trying to run it on a server that did not have X windows running on it and AWT needs that to run properly.

  • Awt/swing class overview

    Hi,
    I have some questions about the general class structure of AWT and Swing:
    - How are AWT and Swing intended to work together -- should I treat AWT as an implementation detail and operate on Swing level only, or should they be used together?
    - What exactly is the purpose of the JComponent class, if there is already aws.Component?
    - Why is the GUI button class "JButton" a subclass of aws.Container? In what way is a button a container component?
    Thanks in advance.

    Hey, you really want to know all the details, do you?
    There is nothing wrong with mixing swing components and awt components, but there are some limitations.
    Read this nice article at the Swing Connection:
    http://java.sun.com/products/jfc/tsc/articles/mixing/index.html
    We need to sort some things out:
    AWT in general is not outdated.
    Swing builds on and extends AWT concepts (e.g. layout managers are part of the AWT package as is the Color class and many other features). It does not replace AWT.
    The only part of AWT that really is outdated are the heavyweight components like Button, CheckBox, ...
    All of these are replaced by lightweight Swing components (and many more components and features are added in Swing).
    Still the AWT components are frequently used in applets. That's because no browser has a recent Java version preconfigured. (Yet, If possible (like in intranet deployment) I would insist that users install recent version of Sun's Java plug-in, so that I can use swing features.)
    The only AWT components that are still used are Frame, Window and Dialog because the corresponding Swing components subclass them.
    Why do you think there is no root for components? All components subclass awt.Component and all Swing components (except for JFrame, JWindow, JDialog) subclass JComponent.
    Stephen

  • Eclipse: transform normal awt/swing app to bean class?

    hi all.
    i have to modify an existing java app that's based on awt and swing. i'd like to edit in in visual editor for eclipse (java bean classes), but how can i do that? is it possible anyhow??
    thanks.
    j0sh

    i do have a visual editor plugin, but it uses "visual" classes, and now id like to know how to transform normal classes to visual classes... =)

  • TCL/Tk- Awt- Swing

    This is my first Java code. I am attempting to use Java for an applet
    that was originally in TCL/Tk. My first pass used just Awt. Now I have
    a Swing version.
    Linux 2.4.8-26mdk
    java version "1.4.0_02"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0_02-b02)
    Java HotSpot(TM) Client VM (build 1.4.0_02-b02, mixed mode)
    appletviewer
    The Awt version works as I expect. The Swing version also works as
    expected except that the filled arc does not display correctly when
    the arc to be displayed is smaller than the previous one.
    AwtCircle.java:
    package org.emle.equipment;
    import java.applet.*;
    import java.awt.*;
    import javax.swing.*;
    public class AwtCircle extends Applet
      private int fractionDenominator;
      private double decimalValue;
      private Button dButtons[] = new Button[9];
      public void init ()
        fractionDenominator = 4;
        decimalValue = 1.0 / (double)fractionDenominator;
        Box dBox = Box.createHorizontalBox();
        for (int ii=2; ii<=8; ii++)
          dButtons[ii] = new Button("1/" + ii);
          dBox.add(dButtons[ii]);
        } this.add(dBox);
      public void paint(Graphics argG)
        argG.setColor(Color.white);
        argG.fillRect(0, 0, 500, 500);
        argG.setColor(Color.lightGray);
        argG.fillArc(100, 50, 100, 100, 0, (int)(decimalValue * 360.0));
      public boolean action(Event argE, Object argO)
        for (int ii=2; ii <= 8; ii++)
          if (argE.target == dButtons[ii])
            fractionDenominator = ii;
        decimalValue = 1.0 / (double)fractionDenominator;
        showStatus("1/" + fractionDenominator);
        paint (getGraphics());
        return true;
    SwingCircle.java:
    package org.emle.equipment;
    public class SwingCircle extends javax.swing.JApplet
      implements java.awt.event.ActionListener
      private int fractionDenominator;
      private double decimalValue;
      private java.awt.Button dButtons[] = new java.awt.Button[9];
      public void init ()
        fractionDenominator = 4;
        decimalValue = 1.0 / (double)fractionDenominator;
        javax.swing.Box dBox = javax.swing.Box.createHorizontalBox();
        for (int ii=2; ii<=8; ii++)
          dButtons[ii] = new java.awt.Button("1/" + ii);
          dBox.add(dButtons[ii]);
          dButtons[ii].addActionListener(this);
        } getContentPane().add(dBox,java.awt.BorderLayout.SOUTH);
      public void paint(java.awt.Graphics argG)
        argG.setColor(java.awt.Color.white);
        argG.drawRect(0, 0, getSize().width - 1, getSize().height - 1);
        argG.setColor(java.awt.Color.lightGray);
        argG.fillArc(100, 50, 100, 100, 0, (int)(decimalValue * 360.0));
        dButtons[fractionDenominator].requestFocus();
      public void actionPerformed(java.awt.event.ActionEvent argE)
        String cmd = argE.getActionCommand();
        for (int ii=2; ii <= 8; ii++)
          if (dButtons[ii].getActionCommand().equals(cmd))
            fractionDenominator = ii;
        decimalValue = 1.0 / (double)fractionDenominator;
        showStatus("1/" + fractionDenominator);
        paint(getGraphics());
        return;
    C.W.Holeman II
    [email protected] http://MistyMountain.org/~cwhii
    Remove the fives Send spam to [email protected]

    Cimi has made tcl/tk-cvs packages.
    http://bbs.archlinux.org/viewtopic.php? … light=cimi

  • AWT/Swing difference Component.paint(Graphics g)

    In the following code, I try to paint some component into a VolatileImage, also tried with BufferedImage, and draw the Image on some other component. Anyways it works with java.awt.Panel doesn't with JPanel, does anyone have a clue why?
    Differences between Graphics and Graphics2D maybe?
    package sqltest;
    import java.awt.*;
    import java.awt.image.*;
    import javax.swing.*;
    public class AWTVC extends java.awt.Panel {
        public AWTVC(Component c) {
            this.c = c;
            //initComponents();
            Thread t = new Thread(){
                public void run(){
                    try{
                    Thread.sleep(2000);
                    bu=createVolatileImage(500,500);
                    while(true){
                        AWTVC.this.c.paint(bu.createGraphics());
                        getComponent(0).paint(bu.createGraphics());
                        AWTVC.this.repaint();
                        Thread.sleep(80);
                    }catch(Exception e){
                        e.printStackTrace();
            t.start();
            initComponents();
        private void initComponents() {
            setLayout(new java.awt.BorderLayout());
            addComponentListener(new java.awt.event.ComponentAdapter() {
                public void componentResized(java.awt.event.ComponentEvent evt) {
                    formComponentResized(evt);
        private void formComponentResized(java.awt.event.ComponentEvent evt) {
            bu=createVolatileImage(getWidth(), getHeight());
        final Component c;
        VolatileImage bu=null;
        public void update(Graphics g){
            g.drawImage(bu,0,0,getWidth(),getHeight(),null);
    }Any help would be greatly appreciated!
    Cheers

    Well thanx alot,
    Well I just asked out of curiosity, it works perfectly with the LIGHTWEIGHT_RENDERER, I was just curious to know why AWT components won't draw into Graphics2D (That seemed to be the problem). Well It works now so it doesn't really matter. Well I think the HeavyWeight Renderer is hardware accelerated, maybe that's the reason. Also since I'm using jdk 1.5 do you think setting the -Dsun.java2d.opengl=true property will improve performance. I have cpu cycles to spare, so I can't see the difference ;-)

  • Java AWT/Swing coexisting with native Qt application

    Hi,
    I'm trying to figure out how to get a GUI application written in Java to work in a native Qt application by embedding the Java application in the Qt application.
    Any suggestions on how to do this...

    It requires creating a system window (possibly frameless) using a native API calls (e.g. WinAPI or Xlib). That window might be embedded in your application. You would have to send system messages to that window (WM_XXXXX on Windows and XEvent's on X).
    For more information I suggest you to look at KDE sources where it is implemented for X Window (there is also a Java package, kjas which is a server for running applets in Konqueror.
    Or if you have much time you could write AWT on top of Qt (there is one built with Gtk+) and give the JVM your classes instead of the original JDK.
    The choice is yours. Happy Qt-ing!

  • Awt swing javafx integration problem

    Hi !
    i'm trying to "merge" a swing component (an extension of a JPanel) in a personal javafx software.
    Is there any way to achieve my goal?
    Surfing the web i found only how to implement javafx in swing...
    thank you!

    solved by using thingsFx classes (new SwingView(swingComponent)) :)
    http://thingsfx.com/

  • Settings for AWT/Swing

    Hi,
    since I saw a lot of simmilar questions but could not find an answer to any of them, let's try a different approach.
    Can anyone be so kind as to post a small source code that for example just opens a JOptionPane.showInputDialog or any other very small widget under Unix/Linux to show that JNI under Unix/Linux works with graphics. As long as I stay out of the graphics business, everything works fine, but whatever I try with Swing, I only get the frame and a rather nasty crash. (Java 1.3.1 - 1.4.2)
    Important would be the compile flags for gcc used, since I think most problems arise from these.
    John.

    Being more specific...
    These are the last lines I get when I run the program. I checked all the files and set read/write/execute rights of ALL files in the whole JRE path to user and group. So this can be ruled out.
    [Dynamic-linking native method java.io.UnixFileSystem.setLastModifiedTime ... JNI]
    [Dynamic-linking native method java.util.prefs.FileSystemPreferences.unlockFile0 ... JNI]
    [Dynamic-linking native method java.lang.Shutdown.halt ... JNI]
    Does anybody have a clue what to do?

  • Altering the field type in an AWT/Swing App

    Hi ,
    I have developed a simple Swing/Jclient application for ADF. All the fields produced on the panel are of type JTextField. Is it possible to alter some of them to JTextArea for example....????
    I have not noticed something relative to it in the property palette of each field.....!!!!
    Can i do that...????
    Note: I use JDev10.1.2
    Thanks....
    Sim

    So... if the fields are generated by the wizard then there is no manner to change the field type...????
    You can just drag a component from the data control palette and when you'll drop it on the panel it will give you various options of field types that you can drop it as.Yes... but how to relate it to a db column...(to bound to a db column of the selected table)????
    I have noticed that the fields generated by the wizard do have the "Document" property as the name of the object view + the db column produced as a step of the wizard.....
    For the item i have added as you have written the document property does not have this object view.name of db column as in the other columns....
    The possible values are:
    default
    defaultStyledDocument
    htmlDocument
    plainDocument
    Sorry , my question on this you have described....But , what about if i add another swing field type first and then i want to bound to a db column....???
    By the way, why are you using 10.1.2 and not 10.1.3?Does the newer version deal with these 'problems' better...???
    Thanks.. a lot for your constant help
    Sim
    Message was edited by:
    sgalaxy

  • Using awt/Swing methods without having to install X on linux server

    Hi,
    I've written a servlet that generates PNG images and send them to your browser. However, I get the following exception:
    Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.
    So I set the variable... but it still doesn't work, because I have no X server on my server, and I wasn't planning on installing a huge system hogging X server...
    Any ideas?
    Regards
    Paul Hamer

    AFAIK Headless AWT (AWT that doesn't need X) is one of the enhancements of Java 1.4. You need to set java.awt.headless=true on the command line of though (-Djava.awt.headless=true).
    If you're not using 1.4 you'll need som awt replacement, one of the first I found with google was http://www.logicstyle.com/projects/wct/docs/userguide.html.
    Another alternatve could be to run a fake display. On one of my linux boxes I kickstart /usr/bin/X11/Xvfb :1 -screen 0 1x1x24 -fn fixed -fc fixed -fp "/usr/lib/X11/fonts/misc:/usr/lib/X11/fonts/100dpi" &in my tomcat startup script. It creates a rather light weight virtual framebuffer with one pixel and satisfy my need to use awt to generate images.

Maybe you are looking for

  • Error message when opening a .cp file (version issue?)

    I am using Captivate 4.0 and exporting to a .swf file. My project partner is using Captivate 3.0 I sent her my Captivate file to use as a template for our project and when she tries to open it, she gets an error message: Adobe Captivate could not ope

  • When completely inactive I will get what sounds like a radio station. It will play for a few seconds then quit. then start again an hour later. no open apps. any similar situations?

    As stated above I will get a random radio station coming through my computer playing ads.  I found similar problems happening to pc users but no help offered to a mac user.  No applications are running in the background (to my knowledge) and its real

  • Help anyone ? 3502 AP Recovery Problem

    I have had one 3502 access points  die in the last few days. I suspect it was broken flash systems and are due for the bin. If anyone can offer  any confirmation or a way to fix it, I would be grateful. On booting, it gives the following error: Xmode

  • XML Signature with WSDL

    Hello!!! I created this topic also at Security forum, but i think that was a wrong choice I need to consume Web Service (WSDL). It's working without any problem. But there is also one operation where I need to add Digitial Signature to it. It is very

  • Not able to do GR

    Hi all, I am working on production in an alternative plant SPQ 80 scenario. I have done all config and customize. the problem what I am facing is while doing the GR in production plant I am getting this error. Document 1000162   does not contain any