Icon in titledBorder title?

Try subclassing TitledBorder and override the paintBorder method: Overide public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { super. PaintBorder(c, g, x, y, width, height); // Now use the graphics context to draw whatever needed g. DrawImage(img, xImageOffset, yImageOffset, imgWidth, imgHeight, observer); } Not desperately sure that this is entirely right method call, but you get the idea; once you have access to the Graphics object, you can paint pretty much whatever you need.

Try subclassing TitledBorder, and override the paintBorder method: @Overide public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { super. PaintBorder(c, g, x, y, width, height); // Now use the graphics context to draw whatever needed g. DrawImage(img, xImageOffset, yImageOffset, imgWidth, imgHeight, observer); } Not desperately sure that this is entirely right method call, but you get the idea; once you have access to the Graphics object, you can paint pretty much whatever you need.

It's probably not what you want, but maybe a nice Unicodeâ„¢ glyph or two would do. Addendum: @rhu's approach is preferable, but I couldn't resist trying this: TitledBorder titled = BorderFactory. CreateTitledBorder("\u2615"); titled.

SetTitleFont(new Font("Dialog", Font. PLAIN, 32)); titled. SetTitleColor(Color.

Blue); label. SetBorder(titled).

Access the private JLabel field, and set the icon on the JLabel. Subclass TitledBorder and re-implement the paintBorder method. Control what is painted on the border.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions