SCJP 6. Learning more now.
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
ken jun wrote:Jesper thanks for your reply
Neglecting the function of changing looks ,can Swing have some unique features like a menu or a list(just an example ingore true or false) that AWT didn't have?
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Jesper de Jong wrote:Why do you think that Swing is not preferred for the GUI in desktop apps? And if Swing is not preferred, what do you think is used instead?
SCJP 6. Learning more now.
Rob Spoor wrote:For desktop applications, Swing is still one of the most-used frameworks. I think SWT is another one that's used a lot.
SCJP 6. Learning more now.
Rob Spoor wrote:
ken jun wrote:Jesper thanks for your reply
Neglecting the function of changing looks ,can Swing have some unique features like a menu or a list(just an example ingore true or false) that AWT didn't have?
Swing has everything AWT has; usually the class has the same name with a J in front (Frame - JFrame, Button - JButton, Menu - JMenu, List - JList). Choice / JComboBox is one of the few exceptions to this "rule".
I would definitely read the Java tutorials on Swing on Oracle's website, and your migration from AWT to Swing shouldn't be too hard. They both use the same event handling mechanism, Swing just adds a lot more, but it still uses golden oldies like ActionListener and MouseListener.
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Rob Spoor wrote:If you want to know popular software written in Java, just check SourceForge.net.
As for why AWT shouldn't be used, that's simply because you can do almost anything you can do in AWT in Swing as well, but vice versa it's a lot harder. JTable, JTree, JSplitPane, those are just a few components without AWT equivalents.
Note that AWT sometimes still comes in handy, but only in the few areas where Swing has no equivalent. SystemTray / TrayIcon comes to mind.
Pat Farrell wrote:You are still writing desktop apps? Not me, I haven't written a serious one in at least a decade. Same for applets. They were cool technology last century. Everything I've written this century has been web-apps, Java back end, HTML front end, these days with lots of javascript.
Obviously, YMMV.
ken jun wrote:your means is that J2EE and J2ME are the most powerful thing of JAVA? I have heared J2EE is hard to learn.....
Pat Farrell wrote:
ken jun wrote:your means is that J2EE and J2ME are the most powerful thing of JAVA? I have heared J2EE is hard to learn.....
I said no such thing. And it has not been called J2EE for years because J2EE was terrible, hard to learn, hard to use.
All of my code, and much (most?) modern Java code is web based. The code uses Servlets and JSP, and of course normal Java classes. There are sections here on the ranch dedicated to Servlets and to JSP.
The future of computing is mobile, smart-phones and tables. Android is developed in a Java-like language.
Pat Farrell wrote:
Nobody talks about Enterprise Java Beans anymore.
SCJP 6. Learning more now.
Rahul Sudip Bose wrote: Its off topic. But, why do you say that ? Where did you get that information ?
Bear Bibeault wrote: most developers of my acquaintance avoid it like the plague. Most who want EJB-like features are using Spring and Hibernate instead, or just forgoing large frameworks.
Rahul Sudip Bose wrote:I mostly find software in .msi or .exe form. Rarely jar. Also, I heard that visual c++, c# are used. Thats why i felt that swing is not preferred.
I was wondering if JavaFX is a replacement for swing ? If so, then i might learn FX instead of swing.
If you want to create a cross-platform desktop app then I think writing it with Java / Swing is not a bad option.
Pat Farrell wrote:We are a friendly place here at the ranch, and we have a very wide international audience. So we get used to folks who are not native speakers. But I am not understanding what you are asking, @ken.
You seem to be focused on buzzwords. I pay little attention to them and other labels, because most are just creations of marketing folks, have little to do with the technical issues that I follow, and most go away quickly. J2EE is a classic example, it arrived with much fanfare, the marketing folks talked a lot about it, but it was a disaster technically. Nobody talks about Enterprise Java Beans anymore.
Android is open source. The operating system is Linux based. Folks write applications in a Java-like language. For anyone except the lawyers, you write in Java. But the Oracle/Sun legal terms prevented Google from doing some of the stuff they wanted, so instead of using Java's JVM, you use Dalvik. And technically, the Java libraries supported by Dalvik are not JSE, JME, or other stuff, they are new and unique. In practice, 99% of the usual stuff is there and works just the same. I'm an engineer, not a lawyer, and perhaps you can't even say you write Java on Android, perhaps you have to legally say you write in Dalvik.
The labels are pretty useless.
ken jun wrote:thanks for your reply I am a beginner and just want to learn more about details about JAVA
Bear Bibeault wrote:EJB1 and EJB2 scarred people for life, and despite the simplifications of EJB3, most developers of my acquaintance avoid it like the plague. Most who want EJB-like features are using Spring and Hibernate instead, or just forgoing large frameworks.
SCJP 6. Learning more now.
Jesper de Jong wrote:
The Vuze bittorrent client is another example of a sophisticated Java desktop app.
SCJP 6. Learning more now.
Rahul Sudip Bose wrote:I wonder if the speed of vuze has something to do with java ?
Pat Farrell wrote:
What, exactly, do you mean by the speed of Vuze? The speed of downloading a torrent is a function of the network.
SCJP 6. Learning more now.
Passed: SCJP 6 (90%), SCJD 6
Other: Spring training, extensive Swing experience
Adrian Romanelli wrote:People are looking to Adobe Flex/ActiionScript as a Swing replacement these days, but since it does not support multi-threading (Swing does) ...
luck, db
There are no new questions, but there may be new answers.
Darryl Burke wrote:
Adrian Romanelli wrote:People are looking to Adobe Flex/ActiionScript as a Swing replacement these days, but since it does not support multi-threading (Swing does) ...
No, it doesn't. Java supports multithreading. Violate Swing's single threaded rule at your own risk. Better still, don't.
http://java.sun.com/products/jfc/tsc/articles/threads/threads1.html
http://java.sun.com/products/jfc/tsc/articles/threads/threads3.html
http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html
Even the few Swing methods that are documented to be thread-safe, aren't. The erroneous documentation has been corrected for Java 7.
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Nam Ha wrote:Swing ... is a good choice for desktop applications because it has ... powerful (threading support)
luck, db
There are no new questions, but there may be new answers.
What does that mean, exactly -- threading support?
Darryl Burke wrote:What does that mean, exactly -- threading support?
Consider Paul's rocket mass heater. |