File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
Arduino in Action
this week in the
General Computing
forum!
A special promo:
Enter your blog post or vote on a blogger to be featured in an upcoming Journal
JavaRanch
»
Java Forums
»
Java
»
Swing / AWT / SWT
Author
JFrame title bar height
S Dan
Greenhorn
Joined: Apr 05, 2005
Posts: 25
posted
Sep 09, 2005 12:20:00
0
Also, how do I change the height of
JFrame
title bar height?
Thanks.
-Dan
Michael Dunn
Ranch Hand
Joined: Jun 09, 2003
Posts: 4632
posted
Sep 09, 2005 17:10:00
0
at best this would be a hack (and not a very good one)
import java.awt.*; import java.awt.event.*; import javax.swing.*; class Testing extends JFrame { public Testing() { JFrame.setDefaultLookAndFeelDecorated(true); JFrame frame = new JFrame(" "); frame.getLayeredPane().getComponent(1).setFont(new Font("Lucida",Font.PLAIN,48)); frame.setSize(300,100); frame.setLocation(400,200); frame.setDefaultCloseOperation(EXIT_ON_CLOSE); frame.setVisible(true); } public static void main(String[] args){new Testing();} }
Stuart Gray
Ranch Hand
Joined: Apr 21, 2005
Posts: 410
posted
Sep 10, 2005 02:20:00
0
Otherwise, will the height be controlled by the current Look and Feel?
I agree. Here's the link:
http://aspose.com/file-tools
subject: JFrame title bar height
Similar Threads
JFrame title bar
Adding Buttons to JFrame title bar
and onto graphics
Windows height
How to change the height of the JFrame title bar and its color?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter