Solved

How to create a non-resizable JDialog with icon

Posted on 2001-07-13
4
771 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

717 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