Skip to main content

Posts

DesignGridLayout: Simple, yet powerful Layoutmanager for arranging swing components

Swing toolkit comes with few standard Layout Managers where none of them serves the need of arranging components in a way that usually developers require. some of them does, but it takes lot of coding time to achieve it. GridBagLayout is the most flexible layout manager available in swing toolkit but their are so many variables that developer has to look after. DesignGridLayout can be a useful LayoutManager to arrange components in less time with very small snippet of code and can still get proper alignment. Layouting with DesignGridLayout is as easy as coding with various GUI Builder tools available in varoius IDEs. Simple program which demonstrates DesignGridLayout: import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JSeparator; import javax.swing.JTextField; import javax.swing.SwingUtilities; import javax.swing.UIManager; import javax.swing.UnsupportedLookAndFeelException; import net.java.dev.designgr...

Java IDE for Learners:

           Simple editors like Notepad, Gedit, edit+  definitely allows us to write a program, but it is always difficult to code, debug and manage even smaller applications. and profession IDEs like Eclipse, Netbeans JDeveloper are definitely not suitable for beginners.[They are pretty advanced to students]            What if we have an IDE which allows the learners to understand the basic coding principles of java, Fundamentals of Object Oriented Programming[OOP] with the pictorial representation along with syntax highlighting, scope highlighting and other cool features?.. sounds good right.                                           BlueJ is a simple Java based IDE developed by Kent university for the beginners and students of Java programming language. The coolest thing about BlueJ is it not only allows ...

Controlling an executable from Java program

Windows tools like Notepad, internet explorer and other executable files can be started from java program through its core API. Procedure to start a Notepad application from java program:  Create an object for Runtime class                          Runtime runtime = Runtime.getRuntime();         Create the command string                          String command = "notepad.exe";         Call exec()                          try{                              Process process = runtime.exec(command);                          }catch(IOException e){                 ...

Introducing Java 7: Moving Java Forward

Hey check out this!.....Oracle is going to introduce Java 7 on July 7 Some of the latest innovations and changes in Java 7 are: 1. A fully functional and supported NIO.2 filesystem provider for zip and jar files. 2. Small language changes and enhancements [Project Coin]         Project Coin includes               Strings in switch statements               try-with-resource statements               Improved type inference for generic instance creation               simplified varargs method invocation               better integral literals,               and improved exception handling[multiple catch] 3. Support for Dynamically typed languages For attending live webcast just by sitting at your desk and for registrations  click below link http://www.o...