First off here is my code:
public static Font kingThing;
public static void main(String[] args) throws IOException {
try {
/** Substance look and feel */
UIManager.setLookAndFeel(new NimbusLookAndFeel());
} catch (UnsupportedLookAndFeelException ulafe) {
Loader loader = new Loader();
loader.doFrame();
}
Start Loader = new Start();
Loader.setVisible(true);
DirectBufferHelper.oggstream().connect();
}
public Start() throws IOException {
/** The name of the frame */
super("Client Launcher");
try {
getContentPane().setBackground(Color.BLACK);
setBackground(Color.BLACK);
/** Creates and adds the main configurations of the frame */
BufferedImage image39 = ImageIO.read(getClass().getResourceAsStream("\\jaggl\\igs\\39.png"));
this.setIconImage(image39);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.setSize(new Dimension(launcherWidth, launcherHeight));
this.setLocationRelativeTo(null);
this.setResizable(false);
getContentPane().setLayout(null);
paintAll();
} catch (IOException e) {
System.out.println(e);
}
try {
InputStream in = getClass().getResourceAsStream("Kingthings Petrock.ttf");
kingThing = Font.createFont(0, in);
} catch (Throwable e) {
e.printStackTrace();
}
}
&
/**
* Loaders main page Username Display
*/
loggedInAsDisplay = new JLabel(getloggedInAs());
loggedInAsDisplay.setBounds(305, 68, 200, 20);
loggedInAsDisplay.setForeground(Color.LIGHT_GRAY);
loggedInAsDisplay.setFont(kingThing);
getContentPane().add(loggedInAsDisplay);
Now when I start up the frame the text displays as a dot. The username is set to the players username. for instance I logged into my test account & my main account. & the following displays:
How do I get it to display the actual text not just a dot. Before I added the font it correctly displayed the text.
What you have creates a font with point size of 1, so you have to derive a font with a larger point size, instead try:
Here the actual docs that specify this, and the text: