Okay I have figured out on how to make the numbers scale.
Rectangle r = ClockStart.window.getBounds();
int h = r.height;
int w = r.width;
g2.drawString(six,(w / 100) * 47 , (h / 100) * 94);
g2.drawString(twelve, (w / 100) * 46, (h / 100) * 10);
g2.drawString(nine, (w / 100) * 4, (h / 100) * 51);
g2.drawString(three, (w / 100) * 90, (h / 100) * 52);
g2.drawString(one, (w / 100) * 71, (h / 100) * 15);
g2.drawString(two, (w / 100) * 86, (h / 100) * 31);
g2.drawString(four, (w / 100) * 85, (h / 100) * 72);
g2.drawString(five, (w / 100) * 71, (h / 100) * 87);
g2.drawString(seven, (w / 100) * 25, (h / 100) * 89);
g2.drawString(eight, (w / 100) * 10, (h / 100) * 73);
g2.drawString(ten, (w / 100) * 10, (h / 100) * 29);
g2.drawString(eleven, (w / 100) * 25, (h / 100) * 14);
Some pretty calculations, it's a bit sloppy tho still but it's a moderate success.
So what I did was I calculated the precentage of their position under normal circumstances.
If the starting coordinates were 375 and 700 in an 800 by 800 window.
375 / 800 * 100 = almost 47%
Making the x coordinate at (w(idth) / 100) * 47 making the x coordinate relative to the screen at all times.
It's a bit unaccurate because I am unable to add doubles to a drawString.
I am still facing a problem as the font remains unchanged. If anyone would know how to make a custom font relative to the window size could you please give me some leads?
If the default font size is 50 it would go down if the window gets smaller and go up if the window gets bigger.
Any help is appreciated.
Best Regards,
Trolltrain