Class should be declared final with all members declared as private and no setter methods....
Immutable class in the sense...the content in the Object of the class can't be changed..
My name is Aravindhan.A and I am with Software AG. Having a passion towards programming...striving to become a vivid programmer... :)
Friday, May 30, 2008
Know about Hashing
Everyone might have used HashMap and HashTable.....have you ever thought howz it handling the keys and values inside...? Even i havnt thought about it....:)
HashTable hashTable_Emp = new HashTable();
hashTable_Emp.put("E1","empName");
It transforms your key to a index value using hash function which enables it for a faster searching mechanism...
To know about hash function----> en.wikipedia.org/wiki/Hash_function
And don forget to hav a look over the hashCode() method under Object class...
http://www.cafeaulait.org/course/week4/38.html
HashTable hashTable_Emp = new HashTable();
hashTable_Emp.put("E1","empName");
It transforms your key to a index value using hash function which enables it for a faster searching mechanism...
To know about hash function----> en.wikipedia.org/wiki/Hash_function
And don forget to hav a look over the hashCode() method under Object class...
http://www.cafeaulait.org/course/week4/38.html
Thursday, May 15, 2008
Java Versionz...
- JDK 1.0 (January 23, 1996)
- JDK 1.1 (February 19, 1997)
- J2SE 1.2 (December 8, 1998)
- J2SE 1.3 (May 8, 2000)
- J2SE 1.4 (February 6, 2002)------------>Merlin
- J2SE 5.0 (September 30, 2004)-------->Tiger
- Java SE 6 (December 11, 2006)-------->Mustang
- Java SE 6 Update 10
- Java SE 7------------------------------>Dolphin
Converting String array to a ArrayList
String[] myArray = new String[]{"One", "Two", "Three"};
ArrayList myList = new ArrayList(Arrays.asList(myArray));
Arrays.asList returns you a fixed size list backed by the specified array...
ArrayList myList = new ArrayList(Arrays.asList(myArray));
Arrays.asList returns you a fixed size list backed by the specified array...
Monday, May 12, 2008
JTable and JScrollPane
If you want to fill up the right corner gap between your JTable and JScrollPane ...
JButton jButton = new JButton(new ImageIcon());
jScrollPane.setCorner(ScrollPaneConstants.UPPER_RIGHT_CORNER, jButton);
If you want the horizontal scrollbar in the scrollpane which contains JTable..
jScrollPane.setHorizontalScrollBarPolicy(
ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
JButton jButton = new JButton(new ImageIcon());
jScrollPane.setCorner(ScrollPaneConstants.UPPER_RIGHT_CORNER, jButton);
If you want the horizontal scrollbar in the scrollpane which contains JTable..
jScrollPane.setHorizontalScrollBarPolicy(
ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
Achieving KeyEvent in Editable ComboBox
ComboBoxEditor comboBoxEditor = jComboBox1.getEditor();
JComponent jComponent = (JComponent)comboBoxEditor.getEditorComponent();
if(jComponent instanceof JTextField){
jComponent.addKeyListener(new KeyListener(){
public void keyTyped(KeyEvent e) {
}
public void keyPressed(KeyEvent e) {
}
public void keyReleased(KeyEvent e) {
JOptionPane.showMessageDialog(null, "Iam from ComboBox");
}
});
}
JComponent jComponent = (JComponent)comboBoxEditor.getEditorComponent();
if(jComponent instanceof JTextField){
jComponent.addKeyListener(new KeyListener(){
public void keyTyped(KeyEvent e) {
}
public void keyPressed(KeyEvent e) {
}
public void keyReleased(KeyEvent e) {
JOptionPane.showMessageDialog(null, "Iam from ComboBox");
}
});
}
Bringing out a ComboBox selection in JOptionPane..
String[] test = {"Java", "Swing", "RCP"};
JOptionPane.showInputDialog(this, "Select Technology", "OptionPaneTitle", JOptionPane.INFORMATION_MESSAGE, icon, test, "Java");
This should bring you an input dialog and the return type would be the selected object...
JOptionPane.showInputDialog(this, "Select Technology", "OptionPaneTitle", JOptionPane.INFORMATION_MESSAGE, icon, test, "Java");
This should bring you an input dialog and the return type would be the selected object...
Adding Popup Menu in Netbeans to a Frame
In the frame mouse clicked event type in the code as
jPopupMenu1.show(this, evt.getX(), evt.getY());
Don't forget to add a menu item to the popup menu......:)
jPopupMenu1.show(this, evt.getX(), evt.getY());
Don't forget to add a menu item to the popup menu......:)
Types of Images in Swing
Toolkit Image, Buffered Image, Volatile Image is H/W accelerated image, Managed Image...
Thursday, May 8, 2008
Be thr @ the Eclipse Demo Camp......
Dont miss the Eclipse Demo Camp - June 2008 -
Ganymede Edition being organized in Bangalore and Chennai ...
Ganymede is the name given for Eclipse 3.4 version. Ganymede is a natural satellite of Jupiter and the largest satellite in the solar system.....
Requesting for Participation and Presentations from the Eclipse
Developers around Bangalore.
Please find more information and for registration please visit the
following ...
About Demo Camp
http://wiki.eclipse.org/Eclipse_DemoCamps_2008_-_Ganymede_Edition
Bangalore :: http://wiki.eclipse.org/Eclipse_DemoCamps_2008_-_Ganymede_Edition/Bangalore
Chennai :: http://wiki.eclipse.org/Eclipse_DemoCamps_2008_-_Ganymede_Edition/Chennai
If you arent able to register .. just send in an email to
democamp@ancitconsulting.com and we would be more than happy to
register you for the event ....
We are also looking for Event Sponsors in terms of providing Space,
Food and Take Aways for the Participants and Speakers ... If you think
your company would be interested to sponsor please do let me know who
i need to contact and talk to to get this organised ....
Looking forward to all your support to make this event a great success
like the two previous events .....
http://wiki.eclipse.org/Bangalore_DemoCamp - Dec 2007
http://wiki.eclipse.org/Bangalore_Eclipse_Community_Meeting_Apr_08
http://www.ancitconsulting.com
Ganymede Edition being organized in Bangalore and Chennai ...
Ganymede is the name given for Eclipse 3.4 version. Ganymede is a natural satellite of Jupiter and the largest satellite in the solar system.....
Requesting for Participation and Presentations from the Eclipse
Developers around Bangalore.
Please find more information and for registration please visit the
following ...
About Demo Camp
http://wiki.eclipse.org
Bangalore :: http://wiki.eclipse.org
Chennai :: http://wiki.eclipse.org
If you arent able to register .. just send in an email to
democamp@ancitconsulting.com and we would be more than happy to
register you for the event ....
We are also looking for Event Sponsors in terms of providing Space,
Food and Take Aways for the Participants and Speakers ... If you think
your company would be interested to sponsor please do let me know who
i need to contact and talk to to get this organised ....
Looking forward to all your support to make this event a great success
like the two previous events .....
http://wiki.eclipse.org
http://wiki.eclipse.org
http://www.ancitconsulting.com
Monday, May 5, 2008
Know about the Belgian Java User Group....
I was juz surfing on for some information on swing labs and found some interesting talks and topics in parleys....(An initiative by Belgian Java User Group..)
Itz a Rich Internet Application (RIA) e-learning platform composed of gud stuffz...If you have something really deserving for the folks out thr....u can post your talks to them....
There are some cool presentation and interviews from the Java Geeks....:)
Itz a Rich Internet Application (RIA) e-learning platform composed of gud stuffz...If you have something really deserving for the folks out thr....u can post your talks to them....
There are some cool presentation and interviews from the Java Geeks....:)
Thursday, May 1, 2008
Music --> my love, my playmate & my crying towel....
I listen to all kinda music and very much interested in dancing as well.... :)
Starting from Ilayaraja, A R Rehman, Harris and from college dayz it moved on to Backstreet Boyz, Eminem, and nuv...Nirvana, KoRn, SOD, Linkin Park, Avril, Fergie, Green Day, RHCP the list...goes on...
Starting from Ilayaraja, A R Rehman, Harris and from college dayz it moved on to Backstreet Boyz, Eminem, and nuv...Nirvana, KoRn, SOD, Linkin Park, Avril, Fergie, Green Day, RHCP the list...goes on...
Aravind @ Unisys
Started working on a R&D project aimed at developing a sophisticated UI for the very old main frame systems...using Swings.
It was a very vibrant team and we enjoyed working together....
I consider myself fortunate as the project moved on from swing to Eclipse RCP technology and currently working on a configuration tool...for the CLARiiON systems from EMC corporation which is used as the external storage device for Unisys mainframe systems.
It was a very vibrant team and we enjoyed working together....
I consider myself fortunate as the project moved on from swing to Eclipse RCP technology and currently working on a configuration tool...for the CLARiiON systems from EMC corporation which is used as the external storage device for Unisys mainframe systems.
Most admired Companies.....
Google, Apple, Unisys Corporation, Sun Microsystems, ThoughtWorks........
Subscribe to:
Posts (Atom)