Solved

How to create a non-resizable JDialog with icon

Posted on 2001-07-13
4
765 Views
Last Modified: 2007-12-19
Hi all,
       The login screen of an application need to have a icon on the dialog's top left(left to the title). I am using JDialog for the login screen. If this JDialog is resizeble the dialoge automatically take the icon from its parennt window. But when it become non re-sizable this icon disappears. Can anybody suggest is there any way to display icon on the top left of a non resizable JDialoge?

Thanks in  advance.
Shimit
0
Comment
Question by:a-1220
4 Comments
 
LVL 3

Expert Comment

by:stimpyjcat
ID: 6281535
What platform/window manager?

The only control you get over the JDialog icon is with the setIcon method.  This is probably preferable to relying on the parent component icon if you want a specific icon for your dialog.

Whether the dialog is resizable is irrelevant to Java when setting the frame's icon.  It is entirely possible, however, that your platform's window manager does things differently if the native window is not resizable; if that's the case, you'd have to reconfigure your window manager.

I have a non-resizable dialog for which the icon appears just fine under win32 (I've used setIcon).  The default window manager on RedHat 6.2 GNU/Linux, however, shows no icon for *any* window (the icon only shows up when the window is iconified).
0
 
LVL 1

Expert Comment

by:boazbl1
ID: 6283133
if you are using windows 2000 / NT 4 u cant use nonresiseable JDialog with icon
0
 
LVL 5

Expert Comment

by:vemul
ID: 7669835
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
- To be PAQ'ed and points NOT refunded
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

vemul
Cleanup Volunteer
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 7729129
Finalized as proposed

modulo

Community Support Moderator
Experts Exchange
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
maven example error 3 52
Error with Java/Cache JDBC Classpath 2 31
Java / Linux and Regular Expressions 11 71
how do i compare an object based on two fields 6 49
An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now