I/m posting this topic again.I need a button to have label on diff lines(like say click and here on 2 lines).Its possible with swing if I use html tag etc but in my architecture I cannot use swing components. can I use couple of awt components and give the look and function of button and work it out Thanks for the help
If you would have used Swing buttons then you could have added 2 labels to it made it look like a multiline one. Or you can create your own custom JButton by extending JButton and overriding its paint method. In that method, you would tokenize your string based on \n, do a few spacing calculations, draw your button, and then draw your broken text. For AWT ,maybe you could use 2 textfields, make them editable(false) & stuff, play with the borders & make it look like a button, then its possible.