The first time I encountered this I really did not pay much attention but after experiencing it the second time in my other ComboBox, I decided to look into it.

The issue happens when I click on the ComboBox the first time and the popup menu list that is shown has its width very short. The second time I click on the ComboBox and the list is shown again, the width is now correct as the width of the list now aligns itself with the ListView.

Seems this is a bug in Java FX 2. User shakir.gusaroff in the Oracle forumprovided an insightful answer regarding this issue.

There is a bug: https://javafx-jira.kenai.com/browse/RT-28876 where the ComboBox popup list is set with the wrong width the first time it is shown if it is wider than prefWidth.

This is fixed in Java FX 8.0 already, but not in Java FX 2.

If you like to make money online, you should look into buying and sell unique domain names. Many large and small business owners are looking for a good domain name that will drive traffic and remain memorable to their customers.

Colleges and universities also like to purchase domain names to ensure that their name is not sullied by those who want to put up lewd pictures of students or promote their athletics department in an unauthorized manner.

Selling domains can also become profitable if a certain domain that you own becomes a pop culture staple. You never know if a domain name that you own will all of a sudden share the same name as a popular TV show or meme that goes viral across the Internet.

A domain that you purchase for pennies could be sold for thousands of dollars to someone who is looking to cash in on the sudden popularity.

Private domain registration at Register.com allows you to register as many unique domains as you need. Whether you are a private business, a college or just a guy who wants to claim a domain name before anyone else does, that is the site that you want to go to claim your name.

You may want yo create something like this.

Now, even using CSS this is not possible if you directly add a label on the TextArea itself and change its z-location. I came across a post somewhere in the Stack Overflow forum and user jewelsea created a custom made BorderedTitledPane class that simulates a Titled Border in Java’s Swing.

Using this class I added a TextArea to the BorderedTitledPane and with a little CSS tweaking, removed the border and changed its z-location so that the Label title will be positioned right between the border of the TextArea.

Here is the BorderedTitlePane.

And here is the CSS code to make that possible.

Doing this in Swing is possibly tedious but Java FX and CSS gives developers so much flexibility creating new layouts.

To use the class, call it like this.

And add it to the scene’s container.

Related Posts Plugin for WordPress, Blogger...