http://lilisworking.wordpress.com/2009/08/19/pilot-study-of-jbutton-undo/ In this post, the programmer faced a rootPane and keyboard register problem. In order to solve it, one have to know the fact that a rootPane has a default button. It was mentioned at How Key bindings work:”Assume the Enter key is pressed while the focus is anywhere inside a frame that has a [...]
Archive for the ‘Tutorial Coverage’ Category
Root panes
Posted in Tutorial Coverage on January 19, 2010 | 1 Comment »
JButton API
Posted in Tutorial Coverage on January 19, 2010 | Leave a Comment »
JButton tutorial consists of three parts. First section discuss common button API. Second section talks about how to use button feature. The last section is the table list of commonly used button-related API (for example, setTex()). Another link here, JComponent API, access the table list of other useful methods on API (for example, setFont()). Button border http://lilisworking.wordpress.com/2009/08/25/pilot-study-of-jbutton-button-interface/ What OP [...]
Layout
Posted in Tutorial Coverage on January 19, 2010 | Leave a Comment »
Experience on third party layout managers http://lilisworking.wordpress.com/2009/10/23/pilot-study-of-jbutton-layout-2/ Third party programmers already provide layout managers for swing. FormLayout mentioned in this thread is one of the most popular Third Party Layout. Tutorial has available link to www.jgoodies.com, which is one of largest third party community. Layout manager usage challenge http://lilisworking.wordpress.com/2009/10/05/pilot-study-of-jbutton-button-shift-down/ One could have many different layout managers in [...]
Paint
Posted in Tutorial Coverage on January 18, 2010 | Leave a Comment »
http://lilisworking.wordpress.com/2009/08/21/pilot-study-of-jbutton-texticon/ How to paint button text string vertically. Study How to use HTML in Swing component will be enough. http://lilisworking.wordpress.com/2009/10/02/pilot-study-of-jbutton-rotation Button rotation is not available in Swing suite. One workaround is to use HTML and paint text on button. See How to use HTML in Swing component. Rob Camickr posted two classes on his wordpress blog Tips4Java that [...]
Design Discussion
Posted in Tutorial Coverage on January 18, 2010 | Leave a Comment »
http://lilisworking.wordpress.com/2009/10/23/pilot-study-of-jbutton-multiple-actionlisteners/ http://lilisworking.wordpress.com/2009/08/21/pilot-study-of-jbutton-array/ ActionListeners and event sources are not solely correspondent. Introduction to Event Listeners offers a chart that explains relationship between listeners and event source. Swing tutorial also provided examples of multiple listeners.http://java.sun.com/docs/books/tutorial/uiswing/examples/events/index.html#MultiListener http://lilisworking.wordpress.com/2009/08/19/pilot-study-of-jbutton-multithreading/ This is another post on multithreading. Op either change his design structure or he have to use another thread handling his second [...]
Using Wrong Component
Posted in Tutorial Coverage on January 18, 2010 | Leave a Comment »
http://lilisworking.wordpress.com/2009/08/26/pilot-study-of-jbutton-button/ JToggle button ” implements toggle functionality inherited by JCheckBox and JRadioButton. Can be instantiated or subclassed to create two-state buttons.” Tutorial does not have special chapter for this comprehensive button type. There’s only a link to JToggleButton Class: http://java.sun.com/javase/7/docs/api/javax/swing/JToggleButton.html. At beneath, Toggle Button Constructors explains when should toggle button be used: “Normally, you use a JRadioButton or JCheckBoxinstead of [...]
API Usability
Posted in Tutorial Coverage on January 18, 2010 | Leave a Comment »
http://lilisworking.wordpress.com/2009/12/14/basic-button-feature/ JButtons have a ‘name’ property (as well as actionCommand), which is implemented by setName(). Not taught in tutorial. Programmers have to look up in Component class. This is confusing comparing to setText(), which set text icon on JButtons. Swing tutorial says “As the ButtonDemo example shows, a Swing button can display both text and an image.”, [...]
Result Set
Posted in Tutorial Coverage on January 18, 2010 | Leave a Comment »
http://lilisworking.wordpress.com/2009/09/07/pilot-study-of-jbutton-button-disabing/ This is not a JButton but Result Set problem. Nothing much with Swing. http://java.sun.com/j2se/1.5.0/docs/api/java/sql/ResultSet.html
Version Difference
Posted in Tutorial Coverage on January 18, 2010 | Leave a Comment »
http://lilisworking.wordpress.com/2009/09/30/pilot-study-of-jbutton-6/ Different OS and Java version could cause various appearance. No tutorial material available to explain. By compile and run SSCCE in threadhttp://forums.sun.com/thread.jspa?forumID=57&threadID=765112 , we could have different LAF with different OS and Java. Not mentioned in tutorial. http://lilisworking.wordpress.com/2009/10/22/pilot-study-of-jbutton-12/ A drawing topic. This feature is only available in JDK 7 http://blogs.sun.com/thejavatutorials/entry/translucent_and_shaped_windows_in
Widget Location and Mouse Event
Posted in Tutorial Coverage on January 18, 2010 | Leave a Comment »
http://lilisworking.wordpress.com/2009/09/01/pilot-study-of-jbutton-button-location/ This topic is rather comprehensive. If a programmer wants to have a draggable button, he/she has to be cautious of several pieces of knowledge: mouseListener and mousemotionListener, Layout, Positioning. Solution is not unique in this circumstance. In reply #5 of the thread, a participant provide a viable solution using both mouseListener and mouse-motionListener. Function mousePressed() and mouseDragged() combine with [...]