"Do you want to display one JLabel with one Font and another with a different Font? That's easy, JLabel has a setFont method."
correct !
how do that here :
label1 = new JLabel(LottoGuiText1 setFont(font2) + TestText); ???
After you do that, do this:
That will assign one single font to your JLabel.
is it possible to change a font style in middle of jpanel? text1 = verdana + text2=font2
I see now. No, not if you play by the rules. But there is a way to do it. You have to override the paintComponent() method and do all the drawing yourself. You'll probably have to measure all the font metrics for the strings you render so after you draw one string with one font, you know where to position the next string with the new font. I'm doing precisely this in several of my applications. You'll want to look at FontRenderContext and TextLayout. You'll use them within paintComponent() when you do your drawing.
Hope this helps. Ask if you have any further questions.