Centering A Window

I'm wondering if it is possible to recenter a window after it has been dragged off screen. I'm new to the OS X scene so forgive my beginner question. Thanks.

Hi there,
All you have to do is drag that window back into the center of the screen. There is no built-in tool to center windows on the screen.
If the window does not appear on the screen at all, then if you click the application's icon in the dock, then click the Window menu you should be able to choose the window you want to see. That will bring it back.
--Travis

Similar Messages

  • Images on webpages are not centered in window

    When I bring up certain webpages (Sadly the Apple website Start page is one of them) the images are off center either horizintally or way off to the right and down below the bottom of the window.  If I bring the the same website in another browser, they are centered like they are supposed to.  Why is Safari not even displaying the Apple website properly?
    Safari 6.0.3
    Other Browser (Google Chrome, sorry)

    test with Safari - Preferences - Extensions set to Off
    If you have safari 6.0.3, check software update - 6.0.5 should be available

  • Centered Popup Window Extension

    For years I used this extension for GoLive to simply launch a
    window, sized accordingly, no toolbars, address bar, etc, and
    CENTERED precisely in the middle of the screen. It worked
    perfectly. It was written by Rasmussens Design Actions.
    The only extension I can find so far for Dreamweaver
    re-locates a popup window after it's launched, so the window scoots
    into place - pretty annoying.
    And, this is a two-step process - I have to add two scripts.
    One to launch the window from the main page, and another script in
    the actual popup window page to center it. Kind of a pain.
    Can anyone point me to a good, all-in-one extension for
    Dreamweaver that can do this?
    Thanks!

    thanser wrote:
    > Can anyone point me to a good, all-in-one extension for
    Dreamweaver that can
    > do this?
    http://fourlevel.com/dreamweaver/extensions/openbrowser/index.htm
    Danilo Celic
    | Extending Knowledge Daily :
    http://CommunityMX.com/
    | Adobe Community Expert

  • Centering Browser window

    Hi
    I really want my Flash/HTML page to automatically adjust the
    size to fill the viewers browser when entering my site. At the
    moment im publishing my flash movie so it is central within my HTML
    page - I dont want the movie to change size, i just want the HTML
    browser window to re adjust and fill each users browser.
    Can anyone help please!!! Thanks
    Ad

    Feel free to copy my CSS code for the into here:
    http://www.passporttobeauty.us/
    Greg
    Adam Deeley wrote:
    > Hi i want the web browser holding my flash site to
    always open central and at a
    > specific size 800x600 when in the users screen when
    opened. (its not the
    > publish settings, i can get my site to be central in the
    browser fine, i just
    > want the browser to open at a sepcific size and central
    within the users
    > screen) I think its some scripting I have to paste in
    the HTML head tag but im
    > unsure of what the java scripting is?
    >
    > Can anyone help Me??
    >
    > Thanks
    >

  • How to get header to stay centered on different browser window sizes

    Hi,
    Is there a way to change the header design so it stays
    centered and moves to accommodate different browser window sizes?
    Right now, it stays where it is, and everything else moves and
    stays centered as window size changes. I'm a new Dreamweaver user.
    the url is
    http://ellifolks.com/
    I tried changing the template I made for the site, and was
    able to delete some things, but it won't let me add things now. I
    can't undo to where it started, either. I tried doing a second
    template. Now I can't save anything -- I get a message saying
    "sharing issues".
    Thank you.

    Combining absolutely positioned elements with centering
    tables (as you have)
    accounts for about 20% of the posts on this forum. It's
    commonly done
    because it seems so easy. This is one of the penalties you
    pay for taking
    that easy road.
    The answer to your question is yes, you can do this.
    1. Make this image the page background -
    http://ellifolks.com/images/ellifolks_web_header_repeat.gif
    - and use CSS to
    give it a style of background-repeat:repeat-x.
    2. Place your assembled header within a STATIC div (i.e., NOT
    a layer) at
    the top of the page by changing this -
    <div id="apDiv1"><img
    src="images/dots_header_left.gif" width="175"
    height="192" alt="dots left" /></div>
    <div id="apDiv2">
    <div align="center"><img
    src="images/header_animals_logo.gif" width="759"
    height="195" alt="ellifolks logo" /></div>
    </div>
    <div id="apDiv3"><img
    src="images/dots_header_right.gif" alt="dots right"
    width="175" height="192" /></div>
    to this -
    <div id="header"><img
    src="images/dots_header_left.gif" width="175"
    height="192" alt="dots left" /><img
    src="images/header_animals_logo.gif"
    width="759" height="195" alt="ellifolks logo" /><img
    src="images/dots_header_right.gif" alt="dots right"
    width="175" height="192"
    /></div>
    3. Add this to your CSS -
    #header { width:1109px; margin:0 auto; }
    That should do the trick.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "zinnia3" <[email protected]> wrote in
    message
    news:[email protected]...
    > Hi,
    >
    > Is there a way to change the header design so it stays
    centered and moves
    > to
    > accommodate different browser window sizes? Right now,
    it stays where it
    > is,
    > and everything else moves and stays centered as window
    size changes. I'm
    > a
    > new Dreamweaver user. the url is
    http://ellifolks.com/
    >
    > I tried changing the template I made for the site, and
    was able to delete
    > some
    > things, but it won't let me add things now. I can't undo
    to where it
    > started,
    > either. I tried doing a second template. Now I can't
    save anything -- I
    > get a
    > message saying "sharing issues".
    >
    > Thank you.
    >
    >

  • Center windows on my screen?

    Is there an application which centers my windows on the screen?
    I do alot of screen recording and I prefer having my windows in the middle of the screen without having them maximized. Any application that centers a window to the middle of my screen? Or any techniques anyone has?
    Thanks;

    ...or you could try playing with an AppleScript...
    =-=-=-=-
    set {screenWidth, screenHeight} to {1680, 1050}
    --    (Enter your own figures or find where to read them from)
    set {widthCentre, heightCentre} to {screenWidth div 2, screenHeight div 2}
    tell application "Finder"
        set currentBounds to bounds of window 1
        set windowWidth to (item 3 of currentBounds) - (item 1 of currentBounds)
        set windowHeight to (item 4 of currentBounds) - (item 2 of currentBounds)
        set newLeft to widthCentre - (windowWidth div 2)
        set newTop to heightCentre - (windowHeight div 2)
        set bounds of window 1 to {newLeft, newTop, newLeft + windowWidth, newTop + windowHeight}
    end tell
    =-=-=-=-
    Hardly foolproof or all-encompassing, but an idea for you to work with if you want to.
    Andreas

  • Cisco Jabber Client for Linux

    Are there any plans to have a Cisco Jabber client on linux?

    Mike,
    The larger body of use case and development for Jabber has centered on Windows and mobile iOS and Android devices. That's not to say that there isn't a contingency of customers that want a Linux client but, as of today, there is no "Jabber" client for that platform. However, I've heard this question asked in a few different forums and the answer thus far has typically been one or both of the following:
    1) There is a Jabber SDK, which could potentially be used to custom develop an application.
    2) Use 3rd-party XMPP client (e.g. Pidgin)
    As for an official answer on "will there be in the future" with a yes/no/maybe and/or a possible timeframe, you would need to reach out to Cisco or your trusted partner as roadmap items cannot be discussed without having a non-disclosure agreement in place. That's what Jamie is getting at in his response.
    D. Hailey
    NetCraftsmen, LLC.

  • Use of dispose() and finalize()

    Hello everyone (first post ever). I have a question about a program that I'm currently working on that doesn't seem to be releasing system resources. Here's a brief description of my program and my problem:
    Program Description: It's a widget that queries a news file every couple of minutes to check if the file was updated. If it was updated, then the taskbar icon flashes and signals the user to click on it to open a window showing them the news.
    Problem: The main use of this program will be just sitting in the taskbar waiting and checking to see if there are any updates. However, after a user opens the window, the memory usage obviously spikes to show the content of the window. After the window is closed, the memory stays allocated and never seems to go back down to it's memory usage when it was just sitting in the taskbar. I have the window set to dispose on close and have fiddled around with adding finalize() and dispose() statements in a couple of different places. I also don't call anything from this class in any of my other classes.
    Here is my Window.class, where I'm hoping the problem is. Thanks.
    package mainFiles;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.border.*;
    // The part of the program that displays the main window of the widget
    public class Window extends JFrame implements ActionListener, WindowListener {
         private static final long serialVersionUID = 1L;
         // Declare the global variables used in the method
         private JButton updateButton;
         // The default constructor of the window
         public Window() {
              // Create the container for holding the content of the widget
              JFrame mainWindow = new JFrame();
              mainWindow.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
              this.centerWindow(mainWindow, 475, 350);
              mainWindow.addWindowListener(this);
              // Customize the look of the JFrame a little bit
              mainWindow.setIconImage(new ImageIcon("system/images/tray_inactive.gif").getImage());
              mainWindow.setTitle("Widget Text");
              mainWindow.setResizable(false);
              // Create the home panel of the widget
              WindowBackground homePanel = new WindowBackground();
              mainWindow.setContentPane(homePanel);
              homePanel.setLayout(new BoxLayout(homePanel, BoxLayout.X_AXIS));
              // Create the left side of the window
              JPanel leftPanel = new JPanel();
              leftPanel.setOpaque(false);
              leftPanel.setPreferredSize(new Dimension(104,324));
              homePanel.add(leftPanel);
              // Add a spacer to the left panel from the top
              leftPanel.add(Box.createRigidArea(new Dimension(104,16)));
              // Add the update button to the left side of the widget
              updateButton = new JButton("Refresh");
              updateButton.addActionListener(this);
              leftPanel.add(updateButton);
              // Create the right side of the window
              JPanel rightPanel = new JPanel();
              rightPanel.setOpaque(false);
              rightPanel.setPreferredSize(new Dimension(365,324));
              homePanel.add(rightPanel);
              // Add a spacer to the right panel from the top
              rightPanel.add(Box.createRigidArea(new Dimension(365,16)));
              // Create the scrollpane which allows the news to be scrolled up and down
              JScrollPane contentScrollPane = new JScrollPane(Content.mainPanel, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
                        JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
              contentScrollPane.getViewport().setOpaque(false);
              contentScrollPane.setOpaque(false);
              contentScrollPane.setEnabled(true);
              // Set the size of the scrollpane, then add it to the right panel
              contentScrollPane.setPreferredSize(new Dimension(356,290));
              rightPanel.add(contentScrollPane);
              // Create an empty border around the scrollpane to remove the border
              Border empty = new EmptyBorder(0,0,0,0);
              contentScrollPane.setBorder(empty);
              contentScrollPane.setViewportBorder(empty);
              // Whenever the window is opened, update the tray icon to inactive
              Widget.updateIconToInactive();
              // Show the window to the user
              mainWindow.setVisible(true);
         // If the main window of the widget is closed, then give the user the ability to make a new one
         public void windowClosing(WindowEvent event) {
              // Set the window to no longer being active
              Widget.windowActive = false;
              // *** This doesn't seem to work
              this.removeAll();
              System.gc();
         // For centering the window on the user's desktop
         public void centerWindow(JFrame window, int width, int height) {
              // Set the size of the window to the size wanted
              window.setSize(width, height);
              // Get the two sizes and compute the average size between them
              Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
              Dimension windowSize = window.getSize();
              int x = (screenSize.width / 2) - (windowSize.width / 2);
              int y = (screenSize.height / 2) - (windowSize.height / 2);
              // Set the location to the center of the screen
              window.setLocation(x, y);
         // Whenever a new WindowBackground is created, paint the background image on it
         public class WindowBackground extends JPanel {
              private static final long serialVersionUID = 1L;
              // Paint the background on the panel
              public void paintComponent(Graphics g) {
                   ImageIcon background = new ImageIcon("system/images/bg_window.gif");
                   background.paintIcon(this, g, 0, 0);
         // For responding to actions performed in the interface
         public void actionPerformed(ActionEvent event) {
              // If the user pushes the manual update button, then check for new updates
              if (event.getSource() == updateButton)
                   Content.check();
         // Although these aren't used, they must be included in the class
         public void windowActivated(WindowEvent arg0) {}
         public void windowClosed(WindowEvent arg0) {}
         public void windowDeactivated(WindowEvent arg0) {}
         public void windowDeiconified(WindowEvent arg0) {}
         public void windowIconified(WindowEvent arg0) {}
         public void windowOpened(WindowEvent arg0) {}
    }

    I'll try to describe it in some more detail:
    When the program first starts up, memory usage is around 9K to 11K, since the only task it has is to check an external file every five minutes to see if it's been updated. If there is an update, then the icon blinks which alerts the user that there is an update available. When they click on the icon, a window pops up displaying the news. Memory usage at this points run up to about 25K. Now this is where the problem comes in. After the window is closed, it should be disposed. Now, from what I understand, that means that the Garbage Collector should destroy it at some point and release the memory that's being used. However, many hours after the window has been closed, the memory usage is still at 25K. I just don't understand why it isn't using 9K-11K at that point.
    The main reason I care so much about memory usage is because this is a program that is going to be running in the background while users play PC games. It's mainly to get in touch with each other and tell each other when an event is happening in a specific game.

  • Accessing method of parent from instanced class

    Heyo!
    I don't know if this makes sense. But I can't figure out another way to do it. Hell, I can't even figure this out. :P
    So. I've got this class:
            JPanel cp = new JPanel();
         JPanel menuScreen = new egMenuScreen();
         JPanel newGame = new egNewGameScreen();
         public EscapeGravityUI() {
              // Create toolkit and get screen size
              Toolkit toolkit = getToolkit();
              Dimension size = toolkit.getScreenSize();
              // Set size, title and close operation on main game window
              setSize(1024, 768);
              setTitle("Escape Gravity");
              setDefaultCloseOperation(EXIT_ON_CLOSE);
              // Remove border
              setUndecorated(true);
              // Instructions for centering game window
              setLocation(size.width/2 - getWidth()/2,
                   size.height/2 - getHeight()/2);
              // Create JPanel and add to JFrame
              cp = menuScreen;
              getContentPane().add(cp);
              // Set KeyListener so we can close window in fullscreen
              this.addKeyListener(new KeyAdapter() {
                   public void keyPressed(KeyEvent e) {
                        if(e.getKeyCode() == KeyEvent.VK_ESCAPE) {
                             System.exit(0);
                             //TODO add nice code for confirming exit
         public void changeScreen(String np) {
              getContentPane().remove(cp);
              if(np == "egngs") {
                   JPanel p = new egNewGameScreen();
              getContentPane().add(p);
              repaint();
         }This class is supposed to be a "holder" for diffrent screens in my game. Every screen represented by a JPanel.
    in egMenuScreen that looks like this:
    public class egMenuScreen extends JPanel {
         public egMenuScreen() {
              // Setup the menu screen
              setBackground(Color.white);
              setSize(1024, 768);
              setLayout(null);
              setFocusable(false);
              // Create menu buttons
              JButton newGame = new JButton("New Game");
              newGame.setBounds(getWidth()/2-60, 60, 120, 30);
              newGame.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent event) {
                        super.changeScreen("egngs");
              JButton loadSaved = new JButton("Load Saved");
              loadSaved.setBounds(getWidth()/2-60, 100, 120, 30);
              loadSaved.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent event) {
                        System.out.println("Load Saved");
              JButton options = new JButton("Options");
              options.setBounds(getWidth()/2-60, 140, 120, 30);
              options.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent event) {
                        System.out.println("Options");
              JButton quit = new JButton("Quit");
              quit.setBounds(getWidth()/2-60, 180, 120, 30);
              quit.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent event) {
                        System.out.println("Quit");
                        System.exit(0);
              // Add buttons to JPanel
              this.add(newGame);
              this.add(loadSaved);
              this.add(options);
              this.add(quit);
    }What I want to do is to change that egMenuScreen to another JPanel class that holds the other screen. I figured I needed to do that from the JFrame (EscapeGravityUI). So the method changeScreen() is supposed to handle that. However I don't know how to run that method from within that instanced JPanel class... does that even make sense?
    I'd really appriciate any help!
    Peace

    Styrisen wrote:
    I looked at CardLayout but that looks like it needs to always have the buttons visible. Huh??
    I may be wrong, Very
    but I want to change the entire screen and as I saw it that wasn't possible with card layout!You're not reading the same stuff that I'm reading.
    Here's a simple seizure-inducing program program that uses CardLayout to change a JPanel that fills the entire JFrame. Each card is simply a JPanel of random color with a label at the top and a red circle of increasing size. The cards are swapped by way of a Swing Timer:
    import java.awt.BasicStroke;
    import java.awt.CardLayout;
    import java.awt.Color;
    import java.awt.Dimension;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.RenderingHints;
    import java.awt.Stroke;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.geom.Ellipse2D;
    import java.util.Random;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.Timer;
    class CardLayoutFun4 extends JPanel
        private static final int DELAY = 100;
        private static final int CARD_COUNT = 180;
        private CardLayout cardlayout = new CardLayout();
        private Timer timer = new Timer(DELAY, new ActionListener()
            public void actionPerformed(ActionEvent e)
                cardlayout.next(CardLayoutFun4.this);
        public CardLayoutFun4()
            setLayout(cardlayout);
            setPreferredSize(new Dimension(1024, 768));
            addCards();
            timer.start();
        private void addCards()
            Random random = new Random();
            for (int i = 0; i < CARD_COUNT; i++)
                final int index = i;
                JPanel cardPanel = new JPanel()
                    private final double diameter = 600 * (index + 1) / CARD_COUNT;
                    protected void paintComponent(Graphics g)
                        super.paintComponent(g);
                        Graphics2D g2 = (Graphics2D) g;
                        g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                                RenderingHints.VALUE_ANTIALIAS_ON);
                        Stroke oldStroke = g2.getStroke();
                        g2.setStroke(new BasicStroke(5));
                        g2.setPaint(Color.red);
                        g2.draw(new Ellipse2D.Double(20, 80, diameter, diameter));
                        g2.setStroke(oldStroke);
                cardPanel.setBackground(new Color(
                        random.nextInt(128),
                        random.nextInt(128),
                        random.nextInt(128)));
                cardPanel.add(new JLabel(String.valueOf(i)));
                add(cardPanel, String.valueOf(i));
        private static void createAndShowUI()
            JFrame frame = new JFrame("CardLayoutFun4");
            frame.getContentPane().add(new CardLayoutFun4());
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.pack();
            frame.setLocationRelativeTo(null);
            frame.setVisible(true);
        public static void main(String[] args)
            java.awt.EventQueue.invokeLater(new Runnable()
                public void run()
                    createAndShowUI();
    }Edited by: Encephalopathic on Jan 19, 2008 8:06 PM

  • Swing Splashscreen

    Hi,
    I am a Java/Swing newbie, trying to convert from C++. I am writing a small app to interface with a PostgreSQL DB. I would like to include a splashscreen, and have used the code on sun's website (see below). I call this from the main().
    The splashscreen loads however it is simply a grey box. I have no idea what is wrong with it? Anybody have any suggestions, much appreciated. Thanks!
    ////////////////////////////////////////// SPLASH SCREEN////////////////////////////////////////////
    public class SplashScreen extends JWindow {
    private int duration;
    public SplashScreen(int d) {
    duration = d;
    // A simple little method to show a title screen in the center
    // of the screen for the amount of time given in the constructor
    public void showSplash() {
    JPanel content = (JPanel)getContentPane();
    content.setBackground(Color.BLUE);
    // Set the window's bounds, centering the window
    int width = 450;
    int height =315;
    Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
    int x = (screen.width-width)/2;
    int y = (screen.height-height)/2;
    setBounds(x,y,width,height);
    // Build the splash screen
    JLabel label = new JLabel(new ImageIcon("/home/ehellaby/lehman.jpg"));
    JLabel copyrt = new JLabel
    ("Lehman Brothers. Developed by Edward Hellaby", JLabel.CENTER);
    copyrt.setFont(new Font("Sans-Serif", Font.BOLD, 12));
    content.add(label, BorderLayout.CENTER);
    content.add(copyrt, BorderLayout.SOUTH);
    Color oraRed = new Color(156, 20, 20, 255);
    content.setBorder(BorderFactory.createLineBorder(oraRed, 10));
    // Display it
    setVisible(true);
    // Wait a little while, maybe while loading resources
    try { Thread.sleep(duration); } catch (Exception e) {}
    setVisible(false);
    public void showSplashAndExit() {
    showSplash();
    System.exit(0);
    }

    OK, i think i got it.
    If i take out the setVisible(false) the splash screen eventually loads up as it should once the rest of my app gets painted to the screen.
    I have to find where to put the call to splash.showSplashScreen().
    If you see below i have tried after setting my MDIForm as visible. But this never doesnt work.
    Sorry if this seems daft, as i say i am a bit of a newbie to the graphics stuff!
    Cheers
    public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {              
                    try{
                        new MDIScreen().setVisible(true);
                    } catch(Exception e){}
                    SplashScreen splash = new SplashScreen(1000);
                    splash.showSplash();
        }

  • Movie download sites

    I'm a newbie...
    I want to start downloading movies and tv shows but I'm petrified about which sites to trust. I tried a site one time which I paid for, however this proved to be a link to Limewire!
    I was told that to download movies to Apple I needed to have the DivX codec (which is now available for Mac). I've downloaded the 15 day free trial...
    I'm wondering where other Apple users are going for downloading and if the DivX codec info I got is true (ie. should I buy the pack/bundle)?
    Thanks in advance for any advice!

    Hi Tiz,
    Yes, it's disappointing, but there's a reason. You see, on OS X, there is no open DRM scheme for companies to use to protect online videos. Apple will not license FairPlay and Microsoft's Windows Media DRM (by far the most popular on the internet) is not supported by Flip4Mac.
    There is hope - however. Microsoft's "Silverlight" platform will fully support OS X (at least at runtime; development will be Windows-only). Large companies like Blockbuster, Amazon, and NetFlix may use that platform to provide universal access to videos.
    There are other DRM solutions for OS X, but none that are currently licensed by the large companies you're looking at. Those guys are, sadly, still very much centered on Windows.

  • Why does the DC installer remove Acrobat Pro XI, and all of its plugins, without warning?

    When you run the "Update" to Acrobat DC, Acrobat XI, and any plugins you are using, disappear. There is no warning. Pro XI is just simply gone.
    It is not possible to install Pro XI along side of DC. If you try, the install seems to work, but the Applications folder only contains DC.
    Also: Acrobat Pro XI does not appear in the Previous Versions list in the Creative Cloud app.
    The only way I have found to get Pro XI back is to uninstall DC, then go to the Pro XI Download page: https://creative.adobe.com/products/acrobat
    Click Download, and the CC applet will download and re-install Acrobat Pro XI. You will then need to re-install all your plugins.
    Adobe: Thank you so much for creating a massive support headache for your customers! Your ability to screw us over knows no bounds.

    Thank you very much for taking your time and answering all the itens.
    01. My description was subpar. I mean this:
    03. I did test and the number of icons it supports in each row is smaller.
    04. Are you sure this is the behavior of XI? I did edit the whole RHP creating new groups and arranging the tools accordingly to my workflow. I did not remember to not be able to remove/add a tool.
    05. The second bar is not permanent. But I understand Adobe chose to clean the UI this way and I simply prefer the other way.
    06. I still did not find the improvements. To place tools in top bar or RHP is also possible in XI. But of course I take your word and will get deeper on this.
    08. Thanks, I was thinking about a tool to search contents.
    10. I mean to dismiss definitively. Did not found a preference for this. And there is no X.
    11. It centers the window vertically no matter the exact position of the last used. Not a serious issue, but still an issue. For example: I set all windows to align to notifications. Acrobat does not:
    Acrobat is behind iTunes notification
    Front: Path Finder, back: Acrobat and InDesign behind all
    Acrobat is behind InDesign window, small difference at bottom
    Illustrator also forgets position and open aligned at top
    12. Very very big grey Open dialog under Mac OS X
    13. It does not crash under a given operation. It occurs with any PDF file and even with no file open. Since the DC install, Illustrator also begun to crash, although less frequently. An example:
    I was using 10.10.2 until some hours ago and now with the updated 10.10.3 the problem remains. I will have to do more tests trying to identify a common element or at least some clue, but the other apps, Adobe's or not, are running OK. If I get any new on this, I will keep you informed.

  • Interesting problem for all students and programmers Have a look!

    Hello. This is a very interesting problem for all programmers and students. I have my spalsh screen class which displays a splash when run from the main method in the same class. However when run from another class( in my case from my login class, when user name and password is validated) I create an instance of the class and show it. But the image in the splash is not shown. Only a squared white background is visible!!!.
    I am sending the two classes
    Can u tell me why and propose a solution. Thanks.
    import java.awt.*;
    import javax.swing.*;
    public class SplashScreen extends JWindow {
    private int duration;
    public SplashScreen(int d) {
    duration = d;
    // A simple little method to show a title screen in the center
    // of the screen for the amount of time given in the constructor
    public void showSplash() {
    JPanel content = (JPanel)getContentPane();
    content.setBackground(Color.white);
    // Set the window's bounds, centering the window
    int width = 300;
    int height =400;
    Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
    int x = (screen.width-width)/2;
    int y = (screen.height-height)/2;
    setBounds(x,y,width,height);
    // Build the splash screen
    JLabel label = new JLabel(new ImageIcon("logo2.gif"));
    JLabel copyrt = new JLabel
    ("Copyright 2004, Timetabler 2004", JLabel.CENTER);
    copyrt.setFont(new Font("Sans-Serif", Font.BOLD, 16));
    content.add(label, BorderLayout.CENTER);
    content.add(copyrt, BorderLayout.SOUTH);
    Color oraRed = new Color(100, 50, 80, 120);
    content.setBorder(BorderFactory.createLineBorder(oraRed, 10));
    // Display it
    setVisible(true);
    // Wait a little while, maybe while loading resources
    try { Thread.sleep(duration); } catch (Exception e) {}
    setVisible(false);
    public void showSplashAndExit() {
    showSplash();
    // System.exit(0);
    // CLASS CALLING THE SPLASH
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.JMenu;
    import javax.swing.*;
    import java.applet.*;
    import java.applet.AudioClip;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.net.URL;
    import java.net.MalformedURLException;
    import java.awt.Dimension;
    import java.awt.Toolkit;
    import java.net.URL;
    public class login extends JDialog
    String username;
    String password;
    JTextField text1;
    JPasswordField text2;
    login()
    //super("Login To TIMETABLER");
    text1=new JTextField(10);
    text2 = new JPasswordField(10);
    text2.setEchoChar('*');
    JLabel label1=new JLabel("Username");
    JLabel label2=new JLabel("Password");
    label1.setFont(new Font("Garamond",Font.BOLD,16));
    label2.setFont(new Font("Garamond",Font.BOLD,16));
    JButton ok=new JButton(" O K ");
    ok.setActionCommand("ok");
    ok.setOpaque(false);
    ok.setFont(new Font("Garamond",Font.BOLD,14));
    ok.setBackground(SystemColor.controlHighlight);
    ok.setForeground(SystemColor.infoText);
    ok.addActionListener(new ActionListener (){
    public void actionPerformed(ActionEvent e)
    System.out.println("ddddd");
    //validatedata();
    ReadText mytext1=new ReadText();
    ReadText2 mytext2=new ReadText2();
    String value1=mytext1.returnpassword();
    String value2=mytext2.returnpassword();
    String user=text1.getText();
    String pass=text2.getText();
    System.out.println("->"+value1);
    System.out.println("->"+value2);
    System.out.println("->"+user);
    System.out.println("->"+pass);
    if ( (user.equals(value1)) && (pass.equals(value2)) )
    System.out.println("->here");
    // setVisible(false);
    // mainpage m=new mainpage();
    // m.setDefaultLookAndFeelDecorated(true);
    // m.callsplash();
    /// m.setSize(640,640);
    // m.show();
    //m.setVisible(true);
    SplashScreen splash = new SplashScreen(5000);
    // Normally, we'd call splash.showSplash() and get on with the program.
    // But, since this is only a test...
    splash.showSplashAndExit();
    else
    { text1.setText("");
    text2.setText("");
    //JOptionPane.MessageDialog(null,
    // "Your Password is Incorrect"
    JButton cancel=new JButton(" C A N C E L ");
    cancel.setActionCommand("cancel");
    cancel.setOpaque(false);
    cancel.setFont(new Font("Garamond",Font.BOLD,14));
    cancel.setBackground(SystemColor.controlHighlight);
    cancel.setForeground(SystemColor.infoText);
    cancel.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e)
    dispose();
    System.exit(0);
    JPanel pan1=new JPanel(new GridLayout(2,1,20,20));
    JPanel pan2=new JPanel(new GridLayout(2,1,20,20));
    JPanel pan3=new JPanel(new FlowLayout(FlowLayout.CENTER,20,20));
    pan1.setOpaque(false);
    pan2.setOpaque(false);
    pan3.setOpaque(false);
    pan1.add(label1);
    pan1.add(label2);
    pan2.add(text1);
    pan2.add(text2);
    pan3.add(ok);
    pan3.add(cancel);
    JPanel_Background main=new JPanel_Background();
    JPanel mainpanel=new JPanel(new BorderLayout(25,25));
    mainpanel.setOpaque(false);
    // mainpanel.setBorder(new BorderLayout(25,25));
    mainpanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createTitledBorder
    ("Login To Timetabler Vision"),BorderFactory.createEmptyBorder(10,20,10,20)));
    mainpanel.add("West",pan1);
    mainpanel.add("Center",pan2);
    mainpanel.add("South",pan3);
    main.add(mainpanel);
    getContentPane().add(main);
    void validatedata()
    ReadText mytext1=new ReadText();
    ReadText2 mytext2=new ReadText2();
    String value1=mytext1.returnpassword();
    String value2=mytext2.returnpassword();
    String user=text1.getText();
    String pass=text2.getText();
    System.out.println("->"+value1);
    System.out.println("->"+value2);
    System.out.println("->"+user);
    System.out.println("->"+pass);
    if ( (user.equals(value1)) && (pass.equals(value2)) )
    SplashScreen splash = new SplashScreen(5000);
    splash.showSplashAndExit();
    dispose();
    else
    { text1.setText("");
    text2.setText("");
    //JOptionPane.MessageDialog(null,
    // "Your Password is Incorrect"
    public void callsplash()
    {SplashScreen splash= new SplashScreen(1500);
    splash.showSplashAndExit();
    public static void main(String args[])
    { login m=new login();
    Dimension screenSize=Toolkit.getDefaultToolkit().getScreenSize();
    int screenPositionX=(int)(screenSize.width/2-390/2);
    int screenPositionY=(int)(screenSize.height/2-260/2);
    m.setLocation(screenPositionX, screenPositionY);
    //m.setResizable(false);
    m.setSize(600,500);
    m.setSize(390,260);
    m.setVisible(true);

    Hi Luis,
    Use tcode XK99 for vendor mass change, select the Fax no field. You have to take note that this changes will be only 1 fax number for all vendors.
    Else you have to use BAPI for mass change.
    regards,
    maia

  • How to display the GUI that we developed, at middle of monitor screen

    I want to display my GUI at middle of monitor screen
    display = new JTextArea(5,20);
              JScrollPane scroller = new JScrollPane(display);
              getContentPane().add(scroller, BorderLayout.SOUTH);
              getContentPane().add(gui);
              pack();
              setSize(300,250);
              show();

    JFrame.setLocationRelativeTo()
    It centers the window if the argument passed to it is null.

  • JFileChooser, multiple dialogs.

    My JFileChooser is getting the path and filename for a file, to be later opened. I'm placing the path and name in a JTextField.
    My problem is this: whenever I click 'Find' and select my file and click 'Open', the path and filename show in the JTextField, but the dialog reopens as though I'm pressing the 'Find' button again.
    Here's my source:
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import javax.swing.*;
    import javax.swing.border.*;
    import javax.swing.filechooser.*;
    public class mm5 extends JFrame implements ActionListener
         String[] sItems = new String[1]; // Stores item titles loaded from file. Will be displayed in JList: lstItems
         String[] sProgram = new String[1]; // The program that is ran when the script is executed.
         String[] sLocation = new String[1]; // The location the program tries to open when the script is executed.
         int[] iTimer = new int[1]; // A value of zero will tell the program that this is a schedule-based item instead of a timer-based one.
         int[][] iTimeDef = new int[1][1]; // The first field in this matrix contains the number of scheduled times the item will be called. The second field contains the hour in which the item will be called.
         Border border1 = new EtchedBorder(EtchedBorder.RAISED, Color.black, new Color(165, 163, 151));
         JFrame fraAdminPanel = new JFrame("Admin Panel");
         JFrame fraAddItem = new JFrame("Add Item");
         JPanel panBack = new JPanel();
              JList lstItems = new JList();
              JScrollPane scpItems = new JScrollPane(lstItems);
              JButton btnRun = new JButton("Run");
              JButton btnReport = new JButton("Report");
              JButton btnInfo = new JButton("Info");
              JButton btnHelp = new JButton("Help");
              JButton btnAdmin = new JButton("Admin");
              JButton btnExit = new JButton("Exit");
              JLabel lblTime1 = new JLabel("Time");
              JLabel lblTime2 = new JLabel("00:00");
         JPanel panAdmin = new JPanel();
              JButton btnAddNew = new JButton("Add New");
         JPanel panAddItem = new JPanel();
              JLabel lblItem = new JLabel("Item Title/Desc.");
              JTextField txfItem = new JTextField(100);
              JLabel lblProgram = new JLabel("Program");
              JComboBox cbxProgram = new JComboBox();
              JLabel lblLocation = new JLabel("Location/URL");
              JTextField txfLocation = new JTextField(100);
              JFileChooser fcLocation = new JFileChooser();
              JButton btnLocation = new JButton("Find");
              ButtonGroup btgTimer = new ButtonGroup();
                   JRadioButton optTimer = new JRadioButton("Timer");
                   JRadioButton optTimeDef = new JRadioButton("Scheduled");
                   JRadioButton optNull = new JRadioButton("");
              JLabel lblTimer = new JLabel("Minutes");
              JTextField txfTimer = new JTextField(3);
              JLabel lblTimeDef = new JLabel("Schedule");
              JTextField txfTimeDef = new JTextField(3);
              JButton btnTimeDef = new JButton("Set");
              JCheckBox cbxException = new JCheckBox();
              JButton btnAdd = new JButton("Add Item");
              JButton btnCancel = new JButton("Cancel");
         public mm5()
              try
                   mmInit();
              catch(Exception e)
                   e.printStackTrace();
         } // End of mm5()
         public void actionPerformed(ActionEvent AE)
              String sTheAction = AE.getActionCommand();
              if(sTheAction == "Admin")
                   System.out.println("Admin button pressed.");
                   adminPanel();
              else if(sTheAction == "Add New")
                   System.out.println("Add New button pressed.");
                   addNewInit();
              else if(sTheAction == "Find")
                   System.out.println("Find button pressed.");
                   findFile();
         } // End of actionPerformed()
         public static void main(String[] args)
              mm5 f = new mm5();
         } // End of main()
         public void mmInit()
              this.setTitle("MultiMonitor 5.0.1");
              this.getContentPane().setLayout(null);
              centerWindow(700, 500); // Centers the window and sets the x,y size.
              addWindowListener(
                   new WindowAdapter()
                        public void windowClosing(WindowEvent e)
                             System.exit(0);
              panBack.setLayout(null);
              panBack.setBounds(new Rectangle(5,5,695,495));
              BackLstItemsInit();
              panBack.add(scpItems, null);
              BackBtnInit();
              panBack.add(btnRun, null);
              panBack.add(btnReport, null);
              panBack.add(btnInfo, null);
              panBack.add(btnHelp, null);
              panBack.add(btnAdmin, null);
              panBack.add(btnExit, null);
              this.getContentPane().add(panBack);
              this.setVisible(true);
         } // End of mmInit()
         public void BackLstItemsInit()
              boolean EOF = false;
              scpItems.setBounds(new Rectangle(5,5,575,450));
              scpItems.setBorder(border1);
              scpItems.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
              lstItems.setListData(sItems);
         } // End of BackLstItemsInit()
         public void BackBtnInit()
              btnRun.setBounds(new Rectangle(585,5,100,25));
                   btnRun.setActionCommand("Run");
                   btnRun.addActionListener(this);
              btnReport.setBounds(new Rectangle(585,30,100,25));
                   btnReport.setActionCommand("Report");
                   btnReport.addActionListener(this);
              btnInfo.setBounds(new Rectangle(585,55,100,25));
                   btnInfo.setActionCommand("Info");
                   btnInfo.addActionListener(this);
              btnHelp.setBounds(new Rectangle(585,80,100,25));
                   btnHelp.setActionCommand("Help");
                   btnHelp.addActionListener(this);
              btnAdmin.setBounds(new Rectangle(585,105,100,25));
                   btnAdmin.setActionCommand("Admin");
                   btnAdmin.addActionListener(this);
              btnExit.setBounds(new Rectangle(585,130,100,25));
                   btnExit.setActionCommand("Exit");
                   btnAdmin.addActionListener(this);
         } // End of BackBtnInit()
         public void centerWindow(int windowWidth, int windowHeight)
              Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
              this.setBounds((d.width - windowWidth)/2, (d.height - windowHeight)/2, windowWidth, windowHeight);
         } // End of centerWindow()
         public String[] enlargeArray(String[] currentArray)
              String[] newArray = new String[currentArray.length + 1];
              for(int i = 0; i<currentArray.length; i++)
                   newArray[i] = currentArray;
              return newArray;
         } // End of enlargeArray()
         public void adminPanel()
              System.out.println("adminPanel() started");
              fraAdminPanel.setVisible(true);
              fraAdminPanel.getContentPane().add(panAdmin);
              fraAdminPanel.setBounds(50,50,100,200);
              panAdmin.setLayout(null);
              panAdmin.setBounds(0,0,110,200);
              btnAddNew.setBounds(new Rectangle(5,5,100,25));
                   btnAddNew.setActionCommand("Add New");
                   btnAddNew.addActionListener(this);
                   panAdmin.add(btnAddNew, null);
         } // End of adminPanel()
         public void addNewInit()
              System.out.println("addItem() started");
              fraAddItem.setVisible(true);
              fraAddItem.getContentPane().add(panAddItem);
              fraAddItem.setBounds(50,50,325,250);
              panAddItem.setLayout(null);
                   panAddItem.setBounds(0,0,325,250);
              lblItem.setBounds(new Rectangle(5,5,200,25));
                   panAddItem.add(lblItem, null);
              txfItem.setBounds(new Rectangle(5,35,200,25));
                   panAddItem.add(txfItem, null);
              lblProgram.setBounds(new Rectangle(210,5,100,25));
                   panAddItem.add(lblProgram, null);
              cbxProgram.setBounds(new Rectangle(210,35,100,25));
                   panAddItem.add(cbxProgram, null);
              lblLocation.setBounds(new Rectangle(5,65,200,25));
                   panAddItem.add(lblLocation, null);
              txfLocation.setBounds(new Rectangle(5,95,200,25));
                   panAddItem.add(txfLocation, null);
              btnLocation.setBounds(new Rectangle(210,95,100,25));
                   btnLocation.setActionCommand("Find");          // Button for JFileChooser
                   btnLocation.addActionListener(this);
                   panAddItem.add(btnLocation, null);
              optTimer.setBounds(new Rectangle(5,125,100,25));
                   optTimer.setActionCommand("optTimer");
                   optTimer.addActionListener(this);
                   btgTimer.add(optTimer);
                   panAddItem.add(optTimer, null);
              optTimeDef.setBounds(new Rectangle(105,125,100,25));
                   optTimeDef.setActionCommand("optTimeDef");
                   optTimeDef.addActionListener(this);
                   btgTimer.add(optTimeDef);
                   panAddItem.add(optTimeDef, null);
              optNull.setActionCommand("optNull");
                   optNull.addActionListener(this);
                   btgTimer.add(optNull);
              lblTimer.setBounds(new Rectangle(5,155,100,25));
                   panAddItem.add(lblTimer, null);
              txfTimer.setBounds(new Rectangle(5,185,100,25));
                   panAddItem.add(txfTimer, null);
              lblTimeDef.setBounds(new Rectangle(105,155,100,25));
                   panAddItem.add(lblTimeDef, null);
              btnTimeDef.setBounds(new Rectangle(105,185,100,25));
                   panAddItem.add(btnTimeDef, null);
              btnAdd.setBounds(new Rectangle(210,155,100,25));
                   btnAdd.setActionCommand("Add");
                   btnAdd.addActionListener(this);
                   panAddItem.add(btnAdd, null);
              btnCancel.setBounds(new Rectangle(210,185,100,25));
                   btnCancel.setActionCommand("Cancel Add");
                   btnCancel.addActionListener(this);
                   panAddItem.add(btnAdd, null);
         } // End of addNewInit()
         public void findFile()
              fcLocation.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
              int iLocation = fcLocation.showOpenDialog(fraAddItem);
              if(iLocation == JFileChooser.APPROVE_OPTION)
                   txfLocation.setText(fcLocation.getCurrentDirectory() + "\\" + fcLocation.getSelectedFile().getName());
                   System.out.println(fcLocation.getSelectedFile().getName() + " selected");
              else
                   System.out.println("No file selected.");
                   return;
         } // End of findFile()

    The problem is with he registration of actionListener for the find button.
    This is being done in your code each time the AddNewItem is being
    used. because of this each time you click Add New Item. another listener
    is registered for the find button and hence the no. of times it will
    show filechooser will keep on increasing.
    Pravin

Maybe you are looking for