I want to create an installer, which downloads files from a URL which is going to be a default value if the Text is blank, and the "hint" will be
Insert your specific URL
And I'm wondering how to add the hint?
Have a look at the documentation of Text. Especially the method setMessage(String):
Sets the widget message. The message text is displayed as a hint for the user, indicating the purpose of the field.
Related
In my application I call an API to get the contents of the file as a String and use the TextArea UIWidget to display the file content to the user.
When I enable cursor selector by setting the setEnaled(true) for the textarea, I see that it gives the user to modify the text. It also shows spell checks and other highlights.
I want to show the user the string giving him power to select text like in pdf while disabling the option to modify the text.
Any pointers regarding how to do that?
Use textArea.setReadonly(true) instead of .setEnabled(false).
I have a table of forms which accepts first name, last name etc. When I navigate through using the tab key and enter some text in first name, all of the text disappears and that row gets selected. I have tried almost all techniques.
Is there any way we can avoid that using coding?
If I use the mouse then it wont give that error.
Assuming an otherwise correct use of JTable, you may need to terminate the edit when focus is lost, as suggested here and here:
table.putClientProperty("terminateEditOnFocusLost", true);
I was wondering that the textbox itself identifies its type and when clicked inside textbox it gives the suggestion for that. For a instance i am creating a textbox for mobile no and when click inside the textbox it correctly detects it. Can anyone explain me how it was coded. It was browser feature or HTML feature?
Here is the Image explanation
This features of modern browsers is called auto-fill option, where the browser recognizes that you have performed a specific search before and suggests information that you have typed before. For sweepers, auto-fill saves a ton of time. When Roboform doesn't fill out a form for me, I usually only have to double-click in the text field and select the data I want from the drop-down list of options. This is particularly useful for daily sweepstakes that require codes.
I have a JCheckBox that should not be checked by the user when a certain other field is empty.
So now I want to have an error popup and then reset the checkbox (I've considered disabling the checkbox, but the connection to the other field is non-obvious, and a tooltip text IMO not visible enough).
What's the correct way to do that in Swing? Through a PropertyVetoException? Where do I throw it and where do I catch it? My first (probably ugly) idea would be to add a ChangeListener that itself shows the popup and resets the value.
Edit: The question is about Nikki (screenshot below), an app I am developing which geotags images and exports them to Google Earth's KMZ format. The checkbox is used to select the images to include in the export. But this requires the images to be gotagged first (which in turn requires either a timestamp, or manual assignment). I don't think this requirement can be made obvious through the UI layout.
(source: brazzy.de)
I would simply disable the check box and add a message explaining why the option is not available. A nice way to show the message is to display a mini exclamation mark next to the check box and put the message in a tooltip.
Poping up an exception often feels wrong because users don't read error messages. For most users an error message popup means that the application did something wrong, in your case it's the normal behavior.
Edit if you insist on letting the check box enabled, another way to show the user that some info is missing would be to flash the missing data. Eg. if latitude and longitude are missing and the user clicks on export, set a red background onto these fields for a just a second. This will clearly show the user what's missing.
In this screen, don't you want to put the mouse over the red circle to understand what's going on?
validation http://www.vogella.de/articles/EclipseDataBinding/images/validation10.gif
I don't think the Export JCheckBox should be disabled at all. Instead, the Export JButton itself should examine the current export list and display any anomalous entries in a way that allows navigation to a chosen photograph. If all entries are correct, Export would proceed as usual.
Addendum: It think you are right to keep the interface as non-modal as possible. My model for this would be unsaved files when exiting an editor or uncommitted changes when closing a project in an IDE.
If that's a status line at the bottom of the window, you might indicate the number of photographs currently selected for export, adding a count if any still need geocoding.
The field should simply be allowed to disable the checkbox. If the coupling is unintuitive then the GUI layout may have to be reconsidered.
EDIT: I ran it from your page, and I believe the issue here is that you actually have a third and fourth step in addition to select folder, select images. The third step is validate image, and fourth is select images for export. I think your problem is that this is not clearly conveyed in the current layout, and that reflects in your question.
I would suggest that you create a separate column containing the checkbox for each image, and that THAT checkbox is disabled until the image passes validation (step 3). Perhaps with an explanatory text in the column about why the image hasn't passed yet.
I have a tr:table with the rowSelection property set to "single". It draws a extra column with a radio buttons inside. But I want to change the text displayed at that column's header. I don't find any property that allow me to accomplish this. I guess I should overwrite some properties file but I haven't found anything on this topic in the Trinidad documentation.
Thanks.
As Trinidad itself doesn't seem to offer this, you can do it with javascript. It is not a clean solution, but it will work.
First, open the generated html code and find the in which you are interested. If it has an ID - document.getElementById("yourformname:tdId"). If it doesn't, try accessing it with getElementsByTagName("td") called on the table. When you have it, set its innerHTML to whatever text you want.
It is an ugly workaround, but will possibly work