Logo F2FInterview

Swing Interview Questions

Q   |   QA

there’s 2 ways. The first thing is to know that a JButton’s edges are drawn by a Border. so you can override the Button’s paintComponent(Graphics) method and draw a circle or rounded rectangle (whatever), and turn off the border. Or you can create a custom border that draws a circle or rounded rectangle around any component and set the button’s border to it.

in the UIDefaults table, override the entry for tabbed pane and put in the SolarisUI delegate.

The Font Class is used to render ‘glyphs’ - the characters you see on the screen. FontMetrics encapsulates information about a specific font on a specific Graphics object. (width of the characters, ascent, descent)

java.awt.AWTEvent. if they say java.awt.Event, they haven’t dealt with swing or AWT in a while.

Use a JEditorPane or JTextPane and set it with an HTMLEditorKit, then load the text into the pane.

In order to link this F2FInterview's page as Reference on your website or Blog, click on below text area and pres (CTRL-C) to copy the code in clipboard or right click then copy the following lines after that paste into your website or Blog.

Get Reference Link To This Page: (copy below code by (CTRL-C) and paste into your website or Blog)
HTML Rendering of above code: