awt 1 « GUI « Java Swing Q&A





1. Java's AWT or Swing for GUI construction?    stackoverflow.com

I need to compose a fairly simple GUI for a server monitoring process. It will have a few tabs which lead to a log tailing, counts of resources, and a ...

2. Using vertical splitter in Java Swing GUI?    stackoverflow.com

I am developing a java desktop application. I have some doubts or problems in designing one thing which is as follows: I want to break the the main frame

JFrame mainFrame = new ...

3. Is Java Swing still in use?    stackoverflow.com

I am planning on making a Java Swing application and was wondering if Swing is still used or if it has been replaced with something else. Thanks in advance!

4. Java GUI Crash happens over VNC!    stackoverflow.com

I have a Java GUI based Application. When I run it on Windows it works fine. But when I am in vnc session to a Linux Box without X11 graphics enabled. ...

5. Java headless GUI without java.awt.headless    stackoverflow.com

According to http://java.sun.com/developer/technicalArticles/J2SE/Desktop/headless/, the only way to get headless operation is by setting java.awt.headless. I'm working on the implementation of a maven plugin, and the code calls jfreechart, and ...

6. Simple GUI question in java    stackoverflow.com

i'm trying a very simple GUI in java. i've just created a small GUI with buttons and when we click each button, it opens a website. So i have have 3 buttons: button1 = ...

7. isGUIInitialized() is false, now what?    stackoverflow.com

I been looking at some code and I find people doing

 public static void main(String[] args) {
     new ExampleCode();
      }
 ExampleCode ...

8. AWT    coderanch.com

They're very much related - much of Swing is built on AWT, using many of its classes and methods. You can't use Swing without knowing some AWT, especially the Component and Container classes, and layout managers. It's possible to use AWT without Swing, but the only reason I know to do it is if you're using an older version of Java ...

9. awt    coderanch.com

Hello ! you please help in this topic ! there is five panels, by default three panels are added to the frame, south panel which containing 3 buttons previous, next, last, the other panel which is added at the north side, which is constant, south panel also constant, whenever i click on next button the existing panel should be remove and ...





10. New to AWT programming..HELP    coderanch.com

11. Swing Vs AWT    coderanch.com

12. Swing & AWT    coderanch.com

13. About java.awt.AudioClip;    coderanch.com

14. Swing vs AWT    coderanch.com

Heavyweight Component (AWT) - Uses native peers to supply graphical representation (Heavy). For example on Windows button looks like Windows button but on Unix the button looks like a Motif button. Lightweight Component (Swing) - Doesn't use native peers to supply graphical representation (Light). Component itself handles all graphics; therefore a button will have the same look and feel running on ...

15. Java AWT Vs SWING    coderanch.com

16. AWT vs SWING    coderanch.com





17. Swing 1.1,1.2 & Awt 1.1,1.2,1.3    coderanch.com

18. AWT Vs.SWING    coderanch.com

All AWT components are heavyweight components. Heavyweight Components :- are those components which have a native peer classes( for a particular platform )associated with it. These component do not know how to draw themselves. Whenever a heavyweight component is drawn/redrawn it sends a signal to it's peer class and this peer class draws the component with native look and feel. A ...

19. awt    coderanch.com

20. AWT    coderanch.com

i have created a software which is similar to WordPad in Windows OS,i have facility 2 insert JPEG images as icons into the document,other facilites include changing color of text,changing the font.the problem is when ever i save i am not able 2 save th colored text,or text with other fonts and pictures,how could i save all these,i need the software ...

21. awt based word processor    coderanch.com

22. AWT problems with Macintosh JVM    coderanch.com

The AWT components are all heavyweight components, meaning that they rely on an underlying peer component provided by the os to do their thing. Therefore they have the L&F that the os prefers. The new swing components are lightweight and have the same L&F on any os. Of course the swing components are only available for a Mac in the OS ...

23. AWT or Swing first    coderanch.com

Swing classes inherit from AWT classes, correct? Should one start with Swing or learn the basic AWT functionality first? One book I read "Java Application Strategies for the AS/400" took some time with the AWT classes and stated that knowledge can be built upon, when you start to study Swing. As with most people, time is a precious commodity. Which path ...

24. AWT - Help needed    coderanch.com

25. Arrange items in AWT List    coderanch.com

What is the best way to allow the users of my program to arrange items in an AWT List Component? I think I could manage a simple sort, but that is not what I really need. It would be better if I could allow the user to drag an drop the items in the list. Is this possible? Any other ideas? ...

26. Problems with Apple's MRJ and AWT    coderanch.com

27. AWT vs Swing; 1.1 vs 1.3    coderanch.com

Hi Cory, I feel that moving from java 1.1 to 1.3 is a good thing. You get much better performing and sophisticated gui components. But, there is one main consideration. Since, yours is a web based solution, running java 1.3 gui components may require the java plugin to be installed on the client machines. Also, my personal opinion is that swings ...

28. Placing awt with swings    coderanch.com

29. sun.awt    coderanch.com

30. swings & awt    coderanch.com

31. AWT Scrollpanes    coderanch.com

I have a problem with scrollpanes, in that I am workin of an epoc device, and am looking to draw a map with a "You are here" image on a map. The problem is that when I place this canvas into a scrollpane it works fine but I have two text fields next to it for entering co-ordinants for the "YOU ...

32. AWT- what do I need to know for the Java Certification    coderanch.com

What do I need to know for the Java Certification for the Layout managers and AWT? And what are some good rules of thumb to help me remember how the layout managers resize and arrange the elements put in them. Thanks! Dale ------------------ By failing to prepare, you are preparing to fail. Benjamin Franklin (1706 - 1790)

33. java.awt    coderanch.com

34. About java. awt    coderanch.com

Which two statements are true? (Choose two). a.The button labeled North and South will have the same width b.The button labeled North and South will have the same height. c.The height of the button labeled North can vary if the Frame is resized. d.The height of the button labeled South can vary if the Frame is resized. e.The width of the ...

35. AWT    coderanch.com

Can Any one please tell me:- I am creating a text editor(Notepad)so please help me 1. how to insert a icon to a toolbar. 2. And how to print a text area on click of a menuItem 3. Inserting a image in the notepad(i am using text area in the notepad) It's urgent Mukesh Kumar

36. AWT    coderanch.com

Can Any one please tell me:- I am creating a text editor(Notepad)so please help me 1. how to insert a icon to a toolbar. 2. And how to print a text area on click of a menuItem 3. Inserting a image in the notepad(i am using text area in the notepad) It's urgent Mukesh Kumar

37. AWT problem    coderanch.com

Hello! I created a java.awt.Frame object as the main window of my application.And I also want to create a children window when I click the button in the main window.Ok,I can do that.But I found the children window always appear in the top-left of the screen. I don't like this appearance.So I want to know how to create a children Window ...

38. awt,swing    coderanch.com

39. setToolTipText() in AWT ??    coderanch.com

40. AWT ?    coderanch.com

import java.awt.* ; import java.awt.event.* ; class FrameDemo extends Frame { public static void main (String[] args){ new FrameDemo.show(); } //Constructor for FrameDemo FrameDemo(){ super("Example Frame"); setBounds( 10, 10, 200, 150 ); addWindowListener( new WindowAdapter(){ public void windowClosing( WindowEvent e){ setVisible (false); dispose(); System.exit(0); } } ); //End of addWindowListener } }

41. swing/awt compatibility ?s    coderanch.com

42. awt euro converter    coderanch.com

hey i was wondering if any1 can help me code a euro converter.heres the question: Design and develop a GUI in Java that allows a user to convert euros to punts. The user should be able to type in the amount and punts and press a button to make the conversion. Have approrpiate error checking on the input. Ensure the application ...

43. Multiple selection in java.awt.List    coderanch.com

Hi Friends, I wanna select multiple items in a list only when the CTRL Key is down. I cannot also use the setMultipleMode() function ... I want to select multiple items only when CTRL Key is down and without using the setMultipleMode(). If u have a solution please help me. Thankz, RAJA

44. AWT/SWING    coderanch.com

45. Swing back to AWT    coderanch.com

How have you set up the html page in which your applet is embedded? I wrote a page which loaded the plugin each time the page was accessed. Here's the code i used :

46. awt.PrinterJob.pageDialog not being nice    coderanch.com

Hello, Using awt.print.PrinterJob.pageDialog() from a JInternalFrame is problematic in two ways: 1. When pressing ESC to close the pageDialog, the keypress is not consumed by it, and is caught by my application, which thinks that it needs to close the window that was currently open (when the pageDialog wasn't there, this is the desired behavior). 2. It acts "sort of" modal, ...

47. Caption with awt    coderanch.com

48. Difference b/w AWT and Swing    coderanch.com

There are wa-a-a-ay too many to list here... Swing is built on top of AWT. AWT resides in the java.awt.* package and it's sub-packages. Swing resides in the javax.swing.* package and it's sub-packages. Every AWT component has a native peer, while only top-level components in Swing have a native peer. Swing uses MVC (Model-View-Controller) architecture. Most Swing components have an xxxModel ...

49. java.awt.List componenet    coderanch.com

50. AWT Vs SWING    coderanch.com

52. Swing or AWT    coderanch.com

I wrote a game of Snake in AWT when I was studying for my certification - I found it an excellent drill on AWT, threads, and serialization of files (for keeping track of high scores). However, it would have been SO MUCH SIMPLER if I had written it in Swing. Fun game to write!

53. Swing or AWT for GUI ??    coderanch.com

Hi I am new to Java programming. I am trying to find out whether I should use AWT or Swing for the GUI part of my application. I just started to explore Swing and I like it very much. Haven't explored AWT yet. My question is, on what basis one would determine to go with Swing or AWT. All suggestions and ...

54. What's faster awt or swing ?    coderanch.com

It depends on what you mean by "faster" and in what regards. AWT uses Native Library calls to draw all of it's components. SWING uses the Graphics2D API to draw all of it's components. So, naturally, AWT would be a bit faster in regards to drawing itself. As far as everything else I would say they are about the same. SUN ...

55. Using AWT    coderanch.com

56. Difference in AWT and SWING    coderanch.com

Very simply, AWT uses the native platform's widget set using a lowest-common-denominator API. If you create a java.awt.Button, it's a Windows button if you run the program on Win32, and a Motif button if you run the program on Solaris, etc. It's hard to write AWT GUIs which look good everywhere. Swing's widgets are drawn on the screen using Java graphics ...

57. swing and awt    coderanch.com

58. AWT and Swing!!!    coderanch.com

Namaste Sathi Well, someone will correct me if I am wrong, however, I believe that the AWT components that are still used in conjunction with SWING are not GUI elements for the most part. For example, to perform an action on the click of a JButton, you create a new java.awt.event.ActionListener and then you will also use a java.awt.event.ActionEvent. There are ...

59. Awt and swings    coderanch.com

60. What is the difference between AWT and Swing?    coderanch.com

They're both windowing toolkits. AWT is older, and the newer Swing is built on (parts of) the AWT. Basically, the difference is this: when the AWT wants to draw a button, it asks the native windowing system to do it -- i.e., it creates a Windows button control, or a Motif button widget. This AWT applications look like the native platform. ...

61. java.awt.AWTException:cannot open XIM    coderanch.com

I am gettin an exception as: java.awt.AWTException:cannot open XIM and at sun.awt.motif.X11InputMethod This exception I get when I am running my Swings application on Debian linux1.1. The same application when I am running on my Windows 2000 professional, there is no such exception. what could be the reason...? what is XIM and why is it going for motif...when I have not ...

62. awt    coderanch.com

For an AWT frame all you need to do is override the paint( Graphics ) method of the frame to draw your image. You can either hardcode the image somewhere (like the constructor of the frame subclass) or have a pair of setImage()/getImage() methods. import java.awt.*; public class ImageFrame extends Frame { private Image image; . . . public Image getImage() ...

63. Problem running AWT code    coderanch.com

Hi, I am having problems getting this code to run. It compiles fine, but when I run it as an application it doesn't do anything (and there are no errors). If I run this from within the Eclipse IDE as a JavaBean it works fine. If I try to run it as a java app. it just doesn't show anything. Any ...

64. Swing VS AWT    coderanch.com

65. Diferences between AWT and Swing    coderanch.com

This question has come up a couple of times. AWT was Sun's first cut at a GUI package for Java. The AWT team then identified several issues they wanted to address and a splinter group began work on Swing, which was originally a separately downloadable package. I believe that in release 1.2 Swing was officially added to the J2SE core. The ...

66. Finding sun.awt.motif.MTookit    coderanch.com

67. Which is faster? Swing or AWT?    coderanch.com

Guys, I have some idea on both of them. 1. Swing: a. Does not depend on native os for drawing. b. Takes care of its drawing apart from the top-level container c. Consumes more memory d. faster 2. AWT: a. Depends on native os for every component b. it is slower c. Does not consme more memory Any INPUTS?

69. Differnece between swing and awt    coderanch.com

70. difference beteween SWING and AWT    coderanch.com

Hello Parul, Swing classes are pure Java classes that look the same on all operating systems. AWT Java classes are not pure Java classes. They use underlying C/C++ native code (OS dependent) that can cause different appearances in different operating systems. There are no big architectural differences; the class hierarchy is almost the same. The difference lies in the way the ...

71. AWT Prob    coderanch.com

72. swing and Awt    coderanch.com

73. Useless arguments in AWT    coderanch.com

I am working on some graphics elements. These represent things that will be drawn onto a Canvas later. For example, one type of element may consist of an Image that was loaded from a file; Another may be a geometric shape, etc. I would like my elements not to have a reference to any AWT components, because the elements may be ...

74. tell me the road map to get a bunch of all swings & awt.    coderanch.com

well iam hanging aroungd with awt & swings. but i dont find an nice collection abt awt, awings( their different classes ,methods, advanced & stylish frames).iam sorry i can afford to buy a book now.plz do provide the web track , to gt all those stuff, which could help me in enhancing my project.thank u regards riyaz

75. Java Ticker (AWT)    coderanch.com

Hi guys, I have to create a Ticker in a Java standalone application, not in an applet...I can only use AWT. I believe there must be someone else who already did it, and I am googling like crazy but I can only find applets or examples without the source code. Any tips on how I can implement it? Should I override ...

77. My PC Crashes with AWT/Swing...    coderanch.com

You've left out perhaps the most significant part of these specs: the OS. But the standard advice is to make sure the OS is fully patched -- i.e., you've applied all the available patches from the vendor -- and the video drivers are also, similarly, fully patched, and then finally, make sure you're using the latest patch level of the appropriate ...

78. Sorry, one more thing with AWT    coderanch.com

import java.awt.*; import java.awt.geom.*; import javax.swing.*; public class ThreeD extends JPanel { protected void paintComponent(Graphics g) { super.paintComponent(g); Graphics2D g2 = (Graphics2D)g; g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); double x = 100.0; double y = 100.0; int width = 100; int height = 100; int depth = 60; Rectangle2D.Double r1 = new Rectangle2D.Double(x, y, width, height); double theta = Math.PI/6; //System.out.println("theta = " + Math.toDegrees(theta)); ...

79. java awt    coderanch.com

80. Looking for AWT version of strut.    coderanch.com

81. Urgent awt code    coderanch.com

82. regarding awt    coderanch.com

83. Swing v/s AWT    coderanch.com

Heavyweight components create UI components in the native UI. So an AWT button is a Windows button. Lightweight components draw UI components. So a Swing button is a picture of a button. Now, where can Swing draw a component? On a heavy one. But Swing can draw a bunch of lightweight components on one heavyweight canvas so it has far fewer ...

84. AWT/SWING & Middleware    coderanch.com

Hello, Please help me with the following: AWT/SWING running on a remote client machine need to access controller (controller on MVC) residing behind a firewall that allows only HTTP requests on port 80. The question is about the communication mechanism to be used. Is HTTP tunnelling the only option? Does SWT/SWING logic own the tunnelling mechanism? If so, how to make ...

85. AWT Instatnce    coderanch.com

86. AWT, why abstract?    coderanch.com

I think it is called Abstract because it is an abstraction of the underlying system (windows, linux, mac os...) actually displaying the components. When you use an AWT component, for example a Button, Java uses native libraries to display the button (think of something like "Windows.displayButton(myButton)" or "Linux.displayButton(myButton)"). The underlying system provides the "concrete" implementation for the "abstract" AWT component.

87. Swing Vs AWT    coderanch.com

Hi guys! I was having an argument with my friend how Classes in AWT are actually more heavy weight than Swing. I even told him that some classes in the awt package are not entirely written in Java. But I need to give him proof. Do you guys agree? Could you point me to an article? Thanks!

88. AWT or SWIN G in GUI?    coderanch.com

hi, 1) i have done programming with Swing. but actually i want to know which package is actually used in real application (if java is used to develop windows Application) to develop gui?? 2) i know that swing has it's own look & feel . all that theroy points i know very well that swing tool kit is non peer based ...

89. Difference between AWT and swings    coderanch.com

90. Getting started with AWT and Swing    coderanch.com

91. Awt and Swing    coderanch.com

92. Why awt is called Abstract    coderanch.com

93. Awt VS Swing    coderanch.com

Swing's are light weight component but,AWT is heavy weighted one. To be more appropriate Swing is pure java(i.e.,) what ever you create using swing Component will get created by java only and it is independent of Operating System(OS).On the other hand AWT uses native method to create Components for your application which makes it dependent on OS. In case of performance,AWT ...

95. compilation problem awt    coderanch.com

Hi I am not getting compilation from this file and also not able to figure out the problem.... program........ ======================================================================= // Source File Name: GroupLayout.java package org.jdesktop.layout; import java.util.ArrayList; import java.util.List; // Referenced classes of package org.jdesktop.layout: // GroupLayout public abstract class GroupLayout$Group extends { int indexOf( spring) { return springs.indexOf(spring); } GroupLayout$Group addSpring( spring, int index) { springs.add(spring); spring.setParent(this); if(!(spring ...

96. How to catch a awt. List adjusting    coderanch.com

97. java.awt stroke    coderanch.com

98. Certification for AWT ?    coderanch.com