X

Geertjan's Blog

  • November 18, 2005

Creating Neat Borders in NetBeans IDE 5.0

Geertjan Wielenga
Product Manager
I'm busy working on organizing a tutorial that lets you create Masoud Kalali's Gmail Checker for NetBeans. (By the way, if you listen to this episode of Java Posse, you'll find that Tor Norbye mentions Masoud's module! He says, among other things, "If you want to live in your IDE, this brings you one step closer.")

I'm learning quite a lot by writing this tutorial. One thing I've learnt is something I wondered about while writing the NetBeans Options Window Extension Module Tutorial—how to create those cool borders around JPanels. For example, here, in the new Gmail Checker Setting panel, which is part of Masoud's module, you see some cool borders with titles—"General Options", "Advanced Options", and "Proxy Settings" (click to enlarge):


Until I read Masoud's tutorial draft, I didn't know how to make those cool borders. I saw them in the other panels in the Options window, but didn't know how to create them. Now I know—select a JPanel and then select the little "..." button in the JPanel's Border property:

Then you get this dialog box (click to enlarge):


Here you select TitledBorders in the top list and then fill in the title in the bottom list. You'll find that you're also able to create a key in the resource bundle, which generates a reference to that key in the Title field.

Pretty neat. From one dialog box to another and at the end you've created a cool border and a professional looking title within it.

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.