Displaying a Window on MSWin2000 without title bar

I need a small Java application which can display some text, effectively on the Windows desktop. I can't see it being possible to dynamically change the graphic which is used as wallpaper to include my text, so I was wondering if it is possible to create a window without borders, background or control bar (including the close/maximise/iconise buttons)? All I want is the actual text!
Cheers
Andy

try this sample code
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class WaitingDialog extends JWindow implements MouseMotionListener{
String text="Please waiting...";
Image bg;
public WaitingDialog() {
bg=Toolkit.getDefaultToolkit().getImage("bg.gif");
     MediaTracker m = new MediaTracker(this);
m.addImage(bg, 0);
try { m.waitForAll();}
catch (InterruptedException exec){}
setSize(200,60);
setLocation(300,260);
public void paint(Graphics g){
// g.setColor(Color.blue);
g.drawImage(bg,0,0,this.getWidth(),this.getHeight(),this);
g.setFont(new Font("Dialog",Font.HANGING_BASELINE,13));
g.setColor(new Color(243,243,243));
g.drawString(text,50,30);
public void setText(String _str){
text=_str;
repaint();
public void repaint(Graphics g){
super.paint(g);
public void mouseDragged(MouseEvent me){
setLocation(me.getPoint());
text="Don't drag me.....";
repaint();
public void mouseMoved(MouseEvent me1){
//don't care
}

Similar Messages

  • Moving Modal Panels without Title Bars

    We have custom modal dialog boxes without Title Bars that we want to be able to move around the display by dragging and dropping in the usual way but by left clicking on the panel background rather than the title bar.
    Programmatically I appear to have to re-position the front panel and all of the display/control elements on that panel fo every move step, is this right or is there an easier way?
    Does anyone have any thoughts?
    Regards
    Steve
    There are 10 types of people in the world that understand binary, those that do and those that don't.

    Hi Chris,
    you're answer came close, I modified it a bit to be more accurate. The things I've done are:
    move the location reading into the event structure (it's better correlated, in the time-out you had a lag of 10 ms.)
    set the timeout to -1 when the mouse is inside the pane (mouse-enter and mouse-leave events)
    Then I'd thought wouldn't it be nice if this code can be a sub-vi called on a mouse-down event?
    That worked BUT in the subvi there are no events generated on the pane class, althought dynamic registration worked I can't seem to trigger events...
    So the sub-vi works but only because of the time-out case....
    Sorry but i can't add attachments
    Ton
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

  • How to screencapture CONTENTS of a window, without title bar?

    I've been trying to find a solution to doing a screen capture but NOT the window title bar, just the CONTENTS of the window. For example, in Photoshop, I only want the image IN the window, not the bits with the 3 coloured blobs in the upper left of all windows and the document title
    All the references I've foiund talk about capturing the wndow, but no-one talks about the contents of the window.
    Am I trying to invent a wheel here?
    Any advice gratefully received.

    Are you asking about screenshots in general? You have three choices: the entire Mac's screen, an entire window including the title bar, or a selection created by dragging a selection rectangle.
    http://support.apple.com/kb/PH11229
    To take a screenshot for posting on this site hold ⌘ Shift 4 to create a selection crosshair. Click and hold while you drag the crosshair over the area you wish to capture and then release the mouse button. You will hear a "camera shutter" sound. This will deposit a screenshot on your Desktop.
    If you can't find it on your Desktop look in your Documents or Downloads folder.
    When you post your response, click the "camera" icon above the text field.
    This will display a dialog box which enables you to choose the screenshot file (remember it's on your Desktop) and click the Insert Image button.
    ⌘ Shift 4 and then pressing the space bar captures the frontmost window.
    ⌘ Shift 3 captures the entire screen.
    Drag the screenshot to the Trash after you post your reply.

  • Can't drag windows around using the title bar-CS4

    I just upgraded to CS4 at work last week and I'm already regretting it. Firstly, using two monitors, CS4 must like my graphics card becasue as soon as I open a document and it begins to render the window, the main monitor loses it's signal and cuts off. So I have to hard shut down and make my 2nd monitor the main one, open CS4 and a file on that monitor, then make it the 2nd monitor and pass it over to my real first monitor with a file open and make that monitor the main one again. Added to that, randomly, files will open as tabs even though I have the option unchecked in prefs. I hate tabs, I want my windows floating. But I digress.
    My current issue is the file windows are not movable using the title bar. I can expand/contract every side grabbing the edge, but clicking, holding and dragging any of the title bar is ineffective. I can drag to tab to undock it, but once floating, the title bar is non-funtional for grabbing. I can also double click on it to tab, just not to drag.
    I use a mac at home and thankfully Adobe hasn't forced the edge to edge palette background on that platform. On the mac we get a 'classic view' or something that does away with the desktop blocking grey window background. Seriously, I can't stand the full screen look. Why can't windows have that option to have just the menu bar, palettes and file windows allowing the desktop to be visible? /rant

    A new video card is often a good idea if yours is over 2 years old.  Even the modern "budget" (e.g., ~$100) cards are hugely powerful nowadays.
    This page, I believe, could be a good starting point for everything you want to know:
    http://kb2.adobe.com/cps/404/kb404898.html
    This page, specifically, talks about tested video cards with Photoshop CS4:
    http://kb2.adobe.com/cps/405/kb405711.html
    A similar page for Photoshop CS5:
    http://kb2.adobe.com/cps/831/cpsid_83117.html
    -Noel

  • Display the full file path in title bar

    I apologize for my username. After getting a ton of "username already exists" I went to the keyboard crushing technique to find one that didn't.
    We currently use Adobe Acrobat 9.5.4
    I am assisting a user who would like the full file path of the opened PDF to display in Adobe's title bar. Right now it only displays the file name, as shown below -
    Instead of "Adbove Community_ Start New Discussion.pdf" he would ideally like to have "C:\users\unamehere\desktop\filename.pdf" or the full UNC path like "\\myserver\department\projectnumber\filename.pdf".
    Is this possible? Thank you in advance for any assistance you may be able to provide.

    Tell me about usernames...
    Unfortunately, I don't think there's any control of this. Adobe regularly change what appears, but they don't let us do it.

  • Displaying our own icon at the title bar of a frame.

    Hai,
    How do i display an Icon of my choice at the title bar of a frame or a dialog box.
    Thank you.

    Thank you shahidjava for the kind reply,
    I tried your code as follows but I'am getting an exception saying "wrong number of arguments in the method.".
    Can you please help this out.
    import java.awt.*;
    import java.awt.event.*;
    public class testIcon extends Frame
         public testIcon()
         setVisible(true);
         setTitle("mohammad afzal....!");
         setBounds(100,100,200,200);
         getIconImage("afzal.gif");
         public static void main(String args[])
         testIcon ti=new testIcon();
    }

  • Print JFrame without title bar and border

    I am trying to print out a JFrame which contains two JPanels. The following code is part of my implementation of Printable which prints the entire JFrame including the title bar and border. I've considered implementing Printable in the JPanel classes but then I don't know how I would get everything on one page as a single image. Is there some way to just print the contentPane of the JFrame?
         public int print(Graphics g, PageFormat pf, int pi)
              throws PrinterException {
              if (pi >= 1) {
                   return Printable.NO_SUCH_PAGE;
              Graphics2D g2 = (Graphics2D) g;
              double scaleX = pf.getImageableWidth()/getWidth();
              double scaleY = pf.getImageableHeight()/getHeight();
              double scale = 1;
              g2.translate((int) pf.getImageableX(), (int) pf.getImageableY());
              if (scaleX < 1 || scaleY < 1) {
                   scale = scaleX < scaleY ? scaleX : scaleY;
                   g2.scale(scale,scale);
              printAll(g2);
              return Printable.PAGE_EXISTS;
         }                    

    Thanks.
    I can get the Jframe without the title bar and I can get it to drag on the desktop with your suggestions. I still need it to have rounded edges.

  • Upgraded to Firefox 29.0 (Mac) and can now no longer minimize browser window by double-clicking title bar. Please advise!

    I recently upgraded to Firefox 29.0 (Mac) and can now no longer my minimize browser window into the dock by double-clicking the title bar. I need to be able to use this feature. Please advise!

    I just upgraded to iTunes 8.0.1.11 too (XP) and am seeing the same behavior. The little mini controller in the taskbar no longer works. If you double click the icon in the system tray, you can restore the iTunes window.
    On the Advanced preferences tab, select both the "Show iTunes icon in system tray"
    and the "Minimize iTunes window to system tray" checkboxes. If only the "Show iTunes icon in system tray" is selected, you will not be able to restore the iTunes window and will have to use the task manager to kill iTunes.
    Hope this gets fixed, I found the task bar controller very handy for pausing/starting/volume control/etc.
    -Roger Pates

  • How can a window show without title bar?

    I want show a window the title(the blue one with maximum, minimum button), how should do? Use JFrame or JDialog?

    Hi,
    Check out this thread. This discusses the option to show window with no titlebar.
    Hope this helps.
    Regards,
    Roopasri Vittal
    Developer Technical Support
    Sun Microsystems
    http://sun.com/developers/support

  • Display of internal hostname on title bar of Internet Explorer

    We are facing a problem regarding host name which gets displayed on the title bar of an Internet Explorer (IE).
    We have installed cFolders on a different server than SRM (internal host name for cFolders: <b>(FQDN Name1).</b> During bid processing when bidder clicks on the collaboration bid invitation link from bid invitation, it connects to cFolders server. At this time it displays internal host name on the title bar of IE on collaboration web page <b>(i.e.FQDN Name1).</b>  As per security concerns, internal host name should not be exposed to external users. Instead, it should have an external host name <b>(i.e. FQDN Name 2)</b> at the same place.

    I'm quite sure the first is requested already on the SQL Developer Exchange. Go there and add your vote and comments to add weight for possible future implementation.
    At least until then, you can do as I: mark your connections with the username (like "DB_X - User_Y").
    To change users in a worksheet, issue:
    ALTER SESSION SET CURRENT_SCHEMA = your_other_schema;Hope that helps,
    K.

  • Removing auto text in app.alert window title bar

    I added the following JS to a button and it works perfectly. Almost! I'm still getting the automatic text "Warning: JavaScript Window-" showing in the title bar. Is there a way to clear this and only show my custom text?
    app.alert ("List specific services and service levels that are legislated (reference applicable legislation).\n\n" + "For example, one long term care bed in rented facility.", 3, 0, "Legislated Mandatory Service Requirements");

    Sounds like you are maximising the window. You might want to look at using full-screen exclusive mode:
    http://java.sun.com/docs/books/tutorial/extra/fullscreen/index.html
    This has advantages over just maximising the window as the painting system can ignore the windows painting system and actively draw directly to the screen. Theres also stuff in the tute about taking advantage of page-flipping, controling the bitdepth, resolution etc.
    If you're already using this please ignore this post.
    Hope this helps
    Michael

  • Title bar gets squashed when a link opens in new window.

    It doesn't happen when i click "open in new window" but only when I click a link that opens in new window automatically. The title bar gets narrower so the tab goes outside the screen. After minimizing and maximizing again it becomes OK. It's the same in "safe mode". I also tried creating a new profile but the problem still exists.

    This issue can be caused by an extension that isn't working properly.
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    * Don't make any changes on the Safe mode start window.
    * https://support.mozilla.com/kb/Safe+Mode
    * https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • Displaying an icon in the title bar of a web page

    Hi Friends,
    Pls temme how 2 display a given icon in the title bar of a web - page, i mean in the title bar of the web - browser which loads the page.
    Thanks in advance,
    Kottayam Achayan

    Hi Friends,
    Pls temme how 2 display a given icon in the title bar
    of a web - page, i mean in the title bar of the web -
    browser which loads the page.
    Thanks in advance,
    Kottayam AchayanIn web.xml, you can use the <icon> element to specify the image to be used.
        <icon>
            <small-icon><!-- Specify a 16X16 GIF or JPG --></small-icon>
            <large-icon><!-- Specify a 32X32 GIF or JPG --></large-icon>
        </icon>Hope this helps.
    Annie.

  • Firefox opens and I see a title bar but the main window content is not refreshed or loaded

    I installed Firefox 4.0 and it installed fine. When I run it, the window opens with the title bar and borders but the inside content pane is blank. The only option I have it to close it.
    If I uninstall 4.0 and reinstall the latest 3.x release, it works fine. I've removed all of the 3rd party add ons but am still having this issue.

    I think I found the problem. I have 3 monitors, my primary monitor is connected through an external USB video card (Sabrenet Viewmax) using DisplayLink drivers. When I move the Firefox browser window over to the laptop monitor or to the monitor that is connected through the laptop's VGA port, Firefox works as expected. Is this a driver issue? a Firefox issue? As a side note, one of my Microsoft apps is having the same exact issue, Microsoft Visual Studio Web Developer Express.
    Help?

  • X11 is opening windows with the title bar under the menu bar

    Hi, I've just upgraded to Leopard and I use X11 at work to log into a Sun and run Cadence. Some of the windows open with their title bar under the menu bar at the top of the screen making it impossible to move or resize the windows. Is there a way to make it open the windows slightly farther down or is this a bug in X11 that will be fixed soon? Previously with Tiger, I never had this problem.

    Great I switched to it shortly after upgrading to 10.5 and as far as what to stick with, i'm not quite sure, but my understanding it's the same open source stuff apple uses and I believe some of the fixes are intended to be used in the future updates, but maybe the xquartz site could fill you in a bit more.

Maybe you are looking for