any one know how to change the label side of ChoiceGroup or TextField.( i mean default label come before the TextField. i need to bring label after the TextField)
sorry for my bad English i guess you guys understand the my problem.
there is no direct support in lcdui classes for your requirement, I would suggest try exploring LWUIT
Using standard controls is bad idea at all. Try to use CustomItem, third-party controls or create your own.
Related
Which is the best way to make a window that has a name a JLabel and two JButton components underneath.
I am new to Swing and I tried some methods but didn't understood too much from any.
What would you suggest to focus my attention on to do this specific thing?
DYM like this?
Or this?
Actually that 2nd one comes from a page linked in the first comment.
But, you might be over complicating the issue and a JOptionPane might be a more suitable solution - see How to make dialogs for more details.
I want to give a user a convenient way to enter range from swing gui.
What can I use? A perfect option would be a slider with two pointers.
SwingX has JXMultiThumbSlider which is exactly what you're looking for.
Btw, this implementation of RangeSlider is more simple for me, but swingx stuff should work somehow too, if your implement Renderer first.
http://ernienotes.wordpress.com/2010/12/27/creating-a-java-swing-range-slider/
I tried many methods to make a JButton such as the "Connect" button which appears in the digichat applet,
but I failed! Oh, I want know: What is the border type of this button? I attached a photo to explain the button; can any one help me with ideas, or tell me how to create it?
It may very well be a custom border, implemented entirely from scratch or a CompoundBorder which is a combination of several standard borders.
There's no way to tell how they have solved it based on the screen shot.
The appearance is defined by the old Mac OS 9 Look & Feel, as shown here:
Although it's a considerably more laborious alternative, you can implement your own ButtonUI, as illustrated here and here.
This is for an application so I don't want a hyperlink. I first tried using a Jbutton without all of border/background stuff and then hooking up an actionListener to it but I couldn't get it to the point where I thought it looked nice. I also tried using a JLabel and hooking up a mouse listener to that but I also couldn't get it to look right.
Basically I would like a way using swing to make a button exactly like a url link in an application. What is the standard way of doing this?
but I couldn't get it to the point where I thought it looked nice
You might want to go into greater detail on just what "looked nice" means. I can see you solving this by either a JButton or a JLabel, but the key is perhaps not to look for another solution but to play with the settings of the button or the label til they look nice. If you can't find a nice solution, then post your code (an SSCCE would work best of all) and perhaps we can help you.
that isn't answer to your question but are you tried to add ButtonModel to your JButton example here
It is a rather heavy hammer to use, but SwingX has a JXHyperLink control that is probably exactly what you want. The source is at http://java.net/projects/swingx/sources/svn/content/trunk/swingx-core/src/main/java/org/jdesktop/swingx/JXHyperlink.java?rev=4027 and you can see an article about it at http://www.javalobby.org/java/forums/t18617.html.
It is old, but SwingX continues to do good things.
It's you're trying to make a desktop application which looks like HTML inside a browser, you might try using some of the richer Swing text components in a read-only mode. You could use a mouse-listener to map X/Y clicks to a particular character of text, and then cause an action to occur on that basis.
I wud like know the way to set the text that is typed in a Jtextfield to the table.Cud anyone help me in it.
Read the value from the textfield and set it in the table’s model.
As my crystal ball is currently being repaired I can not help you without more details.
assuming you are using jigloo or sth similar,it may happen that propertyChange method is not being called and table is not aware of the change,this may help.