Solved

How to create a non-resizable JDialog with icon

Posted on 2001-07-13
4
762 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

760 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

20 Experts available now in Live!

Get 1:1 Help Now