Problem with JPanel on Mac

Hi,
I have a Jpanel with BorderLayout which has two components. First one is a JScrollpane which sits at CENTER and another is JEditorPane which sits at south. JScrollPane itself is over a JEditorPane ..... PROBLEM is I can't see the component sitting at SOUTH, any focus???

Hi,
I haven't seen this before.  Is it possible to get some sample code that illustrates the problem?  Feel free to email me at [email protected] (please remove any attachment extension) and I'll take a look.
Moving discussion to the Problems & Bugs forum.
Thanks,
Chris

Similar Messages

  • Problem with Jpanel repaintingl

    Hi!
    I have a problem with Jpanel.
    First , I add a Jscrollpane to the panel and I don't
    see it.
    Second, I have a paint method in the Jpanel and I do there some painting but when I exe the application I can see the panel painting only when I put the mouse cursor
    on the place where the panel need to be.
    It is very strange.
    Help me.
    Yair.

    Example code??
    Can't tell what's wrong otherwise.
    First , I add a Jscrollpane to the panel and I don't
    see it.Have you added anything to this JScrollPane? Unless you set the scroll bar policies to always on you won't see anything if you haven't added anything to the scrollpane.
    Also, if you're only adding this scrollPane to your JPanel initilise it with
    JPanel whippet = new JPanel(new BorderLayout())
    .. then when you add your scrollPanel to your JPanel do this to make sure its added slap in the in middle of it:
    whippet.add(yourScrollPanel, BorderLayout.CENTER);
    Bit more info please - duuuuuuuuuuuuuuuude (man, "Finding Nemo" was well funny didn't you think.. anyways, that's besides the point.... could just be my 8 year old mental age though.. who knows.)?

  • Problem with facetime for mac

    hello guy! I've got a problem with facetime for mac.My sister has a I-pod touch fourth generation with factime but i cna't phone her a message come on my mac.It say "xxx can't receive facetime's calls"!Can you help me??

    Thanks, Dah•veed.
    I did see mention of using Google Public DNS while I was searching the forums prior to posting, but to be honest didn't think it was a DNS-related problem.
    However, to rule it out I've set the prefered DNS servers on my router to Google's, but FaceTime still disconnects after 4-5 seconds when calling between me and my brother-in-law.  It doesn't matter who initiates the call.
    As a test, before I made the changes to my router, I logged into FaceTime as him on my MBP and tried calling myself on my iMac, and that was successful.
    The same test between the two iMacs when they were here was unsuccessful, so now I'm definitely thinking it's something on the '08 iMac.
    Now I just need to figure out what...

  • Problem with Twitter for Mac notifications

    Hello,
    I have a strange problem with Twitter for Mac. On both my home and office Macs. New posts appear in app window but there aren't any notifications even though notifications are set in preferences to show in both dock and menubar. Perhaps anyone noticed similar strange behaviour? I didn't find anything similar on Twitter forums.
    Thanks in advance.

    Solved by
    Dr.AvituvOct 20, 2014 11:09 PM
    go to Terminal and post this:
    /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchSe rvices.framework/support/lsregister -kill -seed
    if it doesn't have that specific directory try this:
    /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchSe rvices.framework/Versions/A/Support/lsregister -kill -seed
    once the scanning is done (can be short or long, depends on how heavy your system is) RESTART the computer.
    when you're back, go to Apple>system preferences>extensions.... guess who's there.
    I hope it helped.
    The Doctor.
    iMac, OS X Yosemite (10.10)
    To restore Actions extensions for good and other stuff
    THANKS!

  • Having big problems with my new Mac Pro, when I launch Photoshop CC, I get an error message, can carry on but after a few tasks it starts going gar... menus go blank, when you try to save it shows a blank box.... can anybody help?

    Having big problems with my new Mac Pro, when I launch Photoshop CC, I get an error message, can carry on but after a few tasks it starts going gar... menus go blank, when you try to save it shows a blank box.... can anybody help?

    when I launch Photoshop CC, I get an error message
    and what exactly is the text of that error message?

  • I have problems with office for mac  screen resolution, specially with excel

    I have problems with office for mac  screen resolution, specially with excel ?

    For starters, make sure to Check for Updates on any of the Help menus, and make sure the product has all the latest patches. MS did come out with a patch addressing the display issues on Retina Macs. Latest patchlevel is 14.3.2.
    We are talking about Office:Mac 2011, right?

  • I just heard a news report that there is a problem with malware in mac computers that came through a recent java update. Is this true? If so, what should be done about it?

    I just heard a news report that there is a problem with malware in mac computers that came through a recent java update. Is this true? If so, what should be done about it?

    As usual those "news" reports mangled the facts and got most of the story completely wrong. This particular attack did not arise through a Java update, it was distributed through a fraudulent Flash download popup window, or malicious websites that Safari is designed to block.
    If you run Java on your Mac you may be vulnerable to this malware. If you do not run Java there is no risk. If you routinely keep your Mac up to date with Software Update the risk is greatly reduced.
    Shut off the mass market junk that masquerades as "news" and read this to learn some real facts:
      https://discussions.apple.com/docs/DOC-3271

  • Is Anyone else having problems with their I MAC 24" Foggy display?

    Is anyone else having problems with their I MAC 24" having a foggy display in lower right hand corner after the computer has been on for 30 or 45 min? This is now the 2nd computer that has this same problem. Just wondering if anyone else is having this issue with the IMAC 24"? Does anyone know what might be the cause? I have only had the computer for a month. Thanks very much.

    Thank you for the nice welcome.
    Sorry about posting in the wrong area I found the correct discussion board. http://discussions.apple.com/thread.jspa?messageID=7998535#7998535
    Its seems that I am not alone in my problem but I do have good news to report that apple support has acknowledged the issue is happening and a fix is in the works. The support and assistance I received today helped greatly to restore my faith in apple product satisfaction.
    Lets hope you don't have this experience in the future, hopefully a solution can be reached that is in everyone best interest. I may have to drive a greater distance to another apple store but for myself and others like me feel its worth the extra effort to get better customer service in the long run.

  • Problem with JPanel in JFrame

    hai ashrivastava..
    thank u for sending this one..now i got some more problems with that screen .. actually i am added one JPanel to JFrame with BorderLayout at south..the problem is when i am drawing diagram..the part of diagram bellow JPanel is now not visible...and one more problem is ,after adding 6 ro 7 buttons remaing buttons are not vissible..how to increase the size of that JPanel...to add that JPanel i used bellow code
    JFrame f = new JFrame();
    JPanel panel = new JPanel();
    f.getContentPane().add(BorderLayout.SOUTH, panel);

    Hi
    JFrame f = new JFrame();
    JPanel panel = new JPanel();
    // Add this line to ur code with ur requiredWidth and requiredHeight
    panel.setPreferredSize(new Dimension(requiredWidth,requiredHeight));
    f.getContentPane().add(BorderLayout.SOUTH, panel);
    This should solve ur problem
    Ashish

  • Problem with JPanel.updateUI()

    Hello,
    i have a problem with updateUI(), here's a simple example what's wrong. just compile and run the following piece of code and look what happens after 2 seconds: the left panel will be decrease its width after calling updateUI(), but why? is it a bug of updateUI() or is it my fault?
    import java.awt.*;
    import javax.swing.*;
    public class Test extends JPanel
            private JList m_list;
            private DefaultListModel m_listModel;
            private JPanel m_buttons;
            public static GridBagConstraints creategbc (int x, int y, int w, int h, int wx, int wy, int f)
                    GridBagConstraints gbc = new GridBagConstraints();
                    gbc.gridx = x;
                    gbc.gridy = y;
                    gbc.gridwidth = w;
                    gbc.gridheight = h;
                    gbc.weightx = wx;
                    gbc.weighty = wy;
                    gbc.fill = f;
                    gbc.insets = new Insets(5, 5, 5, 5); // kleinen Rahmen ziehen
                    return gbc;
            public Test ()
                    GridBagLayout gbl = new GridBagLayout();
                    setLayout(gbl);
                    GridBagConstraints gbc;
                    initButtons();
                    gbc = creategbc(0, 0, 1, 1, 20, 100, GridBagConstraints.NONE);
                    gbc.anchor = GridBagConstraints.NORTH;
                    gbl.setConstraints(m_buttons, gbc);
                    add(m_buttons);
                    initList();
                    JScrollPane sp = new JScrollPane(m_list);
                    gbc = creategbc(1, 0, 1, 1, 100, 100, GridBagConstraints.BOTH);
                    gbl.setConstraints(sp, gbc);
                    add(sp);
            public void addItem (String item)
                    m_listModel.addElement(item);
            public void initList ()
                    m_listModel = new DefaultListModel();
                    m_list = new JList(m_listModel);
            public void initButtons ()
                    m_buttons = new JPanel();
                    m_buttons.setLayout(new GridLayout(4, 1, 0, 20));
                    m_buttons.add(new JButton("Neu"));
                    m_buttons.add(new JButton("Bearbeiten"));
                    m_buttons.add(new JButton("L�schen"));
                    m_buttons.add(new JButton("Abfrage"));
            public static void main (String[] args)
                    JFrame f = new JFrame();
                    Test t = new Test();
                    f.setContentPane(t);
                    f.setSize(600, 450);
                    f.setVisible(true);
                    try
                            Thread.sleep(2000);
                    catch (Exception e)
                    t.addItem("Hallo");
                    t.updateUI();

    Hello,
    i have a problem with updateUI(), here's a simple
    example what's wrong. just compile and run the
    following piece of code and look what happens after 2
    seconds: the left panel will be decrease its width
    after calling updateUI(), but why? is it a bug of
    updateUI() or is it my fault?updateUI() its called when the L&F is changed, there is
    rarely a case when you need to call updateUI().
    Why do you call updateUI() if you remove the call to updateUI()
    everything will work OK.
    merry xmas

  • Problem with JPanel and JDesktopPane

    Hi,
    I am having a problem with my app and I wonder if someone can see what I am doing wrong. I have a class that extends JFrame that holds a centered JPanel to draw on. There are also 3-4 other JInternalFrames that are in use.
    From what I have read to use JDesktopPane to organize the JInternalFrames, all you do is add the JInternalFrames to the JDesktopPane and setContentPane to be the JdesktopPane:
            Jpanel panel = new JPanel();
            JDesktopPane dm = new JDesktopPane();
            setContentPane(dm);
            dm.add(panel, BorderLayout.CENTER);
            dm.add(internalFrame1);
            dm.add(internalFrame2);
            dm.add(internalFrame3);But as soon as I add the panel to the JDesktopPane then my JPanel doesnt show up. As I had it before I was adding the panel to the content pane of the Jframe, and adding the JinternalFrames to the layeredPane like this:
            getContentPane().add(panel, BorderLayout.CENTER);
            lp = getLayeredPane();
            lp.add(internalFrame1);
            lp.add(internalFrame2);
            lp.add(internalFrame3);and this worked but the JInternalFrames behaved badly, not getting focus or moving to the top frame when clicked, which I guess is what JDesktopPane is supposed to do. But how do I get my original JPanel in my JFrame to show up when added to the JDesktopPanel?
    Am I missing something here?
    Thanks,
    Paul

    Thanks for your response. I will try that when I get home, although I will be surprised if that works because I am already using setPreferredSize() . It seemed to me that once a Jframe's content pane gets assigned to a JDesktopPane, then the JPanel no longer has anywhere to draw itself, as according to the Sun documentation, you can only add a JInternalFrame to a JDesktopPane.
    So I am thinking its not possible to have a JPanel as the content pane of a JFrame while having a JDesktopPane containing my JInternalFrames. Is this indeed the case?
    Thanks,
    Paul

  • Weird problem with jpanel vs jframe

    I'm using jmathplot.jar from JMathTools which lets me do 3d plotting. I used a JFrame to get some code to work and it worked fine. Here's the code that worked for a JFrame:
    public class View extends JFrame
        private Model myModel;
        private Plot3DPanel myPanel;
        // ... Components
        public View(Model m)
            myModel = m; 
            // ... Initialize components
            myPanel = new Plot3DPanel("SOUTH");
            myPanel.addGridPlot("Test",myModel.getXRange(),myModel.getYRange(),myModel.getZValues());
            setSize(600, 600);
            setContentPane(myPanel);
            setVisible(true);
    }Here's the class that starts everything:
    public class TestApplet extends JApplet
        public void init()
            //Execute a job on the event-dispatching thread; creating this applet's GUI.
            try
                SwingUtilities.invokeAndWait(new Runnable()
                    public void run()
                        createGUI();
            catch (Exception e)
                e.printStackTrace();
        private void createGUI()
            System.out.println("Creating GUI");
            Model model = new Model();
            View view = new View(model);
    }And here's the Model:
    public class Model
        private double[] myXRange,myYRange;
        private double[][] myZValues;
        public Model()
            createDataSet();
        public double[] getXRange()
            return myXRange;
        public double[] getYRange()
            return myYRange;
        public double[][] getZValues()
            return myZValues;
        private void createDataSet()
            myXRange = new double[10];
            myYRange = new double[10];
            myZValues = new double[10][10];
            for(double i=0;i<10;i++)
                for(double j=0;j<10;j++)
                    double x = i/10;
                    double y = j/10;
                    myXRange[(int) i] = x;
                    myYRange[(int) j] = y;
                    myZValues[(int) i][(int) j]= Math.cos(x*Math.PI)*Math.sin(y*Math.PI);
    }However, as you can see, my main class is a JApplet because ideally I want View to be a JPanel that I add to the applet. All I did was change "extends JFrame" to "extends JApplet" and changed:
    setSize(600, 600);
    setContentPane(myPanel);
    setVisible(true);to
    this.add(myPanel);and added these two lines to createGUI():
            view.setOpaque(true);
            setContentPane(view);When I run it however, it appears really really small. It seems like its drawing the panel to the default size of the applet viewer and doesn't resize it when I resize the applet. I don't know if it's a problem with the library or if I'm doing something wrong in my applet.

    However, as you can see, my main class is a JApplet because ideally I want View to be a JPanel that I add to the applet. All I did was change "extends JFrame" to "extends JApplet" and (...)What do you mean? View extends JApplet? I thought View was meant to extend JPanel in the end...
    When I run it however, it appears really really small. It seems like its drawing the panel to the default size of the applet viewer and doesn't resize it when I resize the applet.Or, the panel has its preferred size, and this latter is too small. Actually the panel has the size its container's layout manager awards it (taking or not the panel's preferred, minimum, and maximum sizes into account). See the tutorial on [layout managers|http://java.sun.com/docs/books/tutorial/uiswing/layout/index.html] .
    In particular, this line adds the myPanel to a parent panel (presumably, it is in class View which extends JPanel, whose default layout is FlowLayout):
    this.add(myPanel);
    I don't know if it's a problem with the library or if I'm doing something wrong in my applet.Likely not (presumably the library interfers only in how it computes the Plot3DPanel's preferred size). There's an easy way to tell: try to layout correctly a custom JPanel of yours, containing only e.g. a button with an icon. Once you understand the basics of layout management, revisit the example using ther 3rd-party library.
    N.B.: there are a lot of "likely" and "presumably" in my reply: in order to avoid hardly-educated guesses especially on what is or isn't in your actual code, you'd better provide an SSCCE , which means reproducing the problem without the 3rd party library.

  • Problems with DPS on Mac OS 10.8.2

    Hi,
    Two of my students (Digital Publishing at SintLucas Eindhoven, Netherlands) are having problems with their Folio Overlays and Folio Builder. They are working on Mac OS 10.8.2 and the Folio Overlays panel is there, but just doesn't work.
    In the Folio Builder there is a message "you do not have a compatible digital publishing plug-in" with a download link. They have downloaded an installed this and the Application Manager says everything is up-to-date, but the Folio Overlays panel still doesn't work and  the Folio Builder still has the same message.
    Does anybody have a solution for this problem?
    Ronald den Bekker
    Teacher Digital Publishing

    Try this:
    1. Uninstall Adobe air.
    2. Restart Mac.
    3. Re-install DPS tools from : http://www.adobe.com/downloads/

  • Problems with wrt610n and mac mini (MA206LL/A*)

    i purchased a new wrt610n and one of the machines that is connected is a mac mini, 1.66 ghz intel core duo.
    #ma2066/ll/a for those who want to compare notes. the computer is stock with the 802.11g wireless card 
    that came with the machine. it is running the current software and all the updates are up to date.
    i am using wpa 2 personal w / aes
    their is some kind of incompatibility or issue between the wrt610n and the mac mini. 
    either using the wireless connection OR connected directly to the router, web pages are very slow to load. sometimes it can take
    up to 45 seconds for the mac mini to open up a webpage. for 45 seconds it is at 'contacting website'
    when  i try to run software update, i get a time out error -1001, make sure you can connect to the internet and try again.
    hulu desktop is also running slow.
    copying a file from the mac mini to a another computer over wifi averages about 1 mb/s
    when i informed linksys about this problem, they took my phone number and said that a linksys technician / senior tech support employee
    would call me back. that was a day or so ago. i asked if i can have any newer firmware, considering the latest is 5 months old.
    i am considering returning this router, but i don't see a lot of good alternatives that have similar features. i have 21 days to return this. the restocking fee will be 15% i am also considering various 802.11n solutions for the mac mini, even including the dell 1500 wireless mini card, i heard it works as an airport card.
    if i do get a different model router i would like external antennas.
    my previous router was a 5 year old wrt54gs version 2.0, and it never had a problem with any of the computers with the network.
    the trouble shooting steps involved changing the beacon to 75 and the mtu to something else, i forgot. it did not make a difference.
    i moved the mini and connected it wired to the wrt610 and turned off the airport wireless card and there was no improvement.
    when i disconnected the wrt610n and connected the mac mini directly to my dsl modem. the issues were suddenly gone. 
    theres some kind of problem with this particular unit. and i would like to hear from others who have solved this or are experiencing
    the same probem

    Try this -
    Open an Internet Explorer browser page on your wired computer(desktop).In the address bar type - 192.168.1.1 and press Enter...Leave username blank & in password use admin in lower case...
    For Wireless Settings, please do the following : -
    Click on the Wireless tab
    2.4GHz Wireless Settings : 
    - Here select manual configuration...Wireless Network mode should be mixed...
    - Provide a unique name in the Wireless Network Name (SSID) box in order to differentiate your network from your neighbours network...
    - Set the Radio Band to Standard-20MHz and change the Standard channel to 11-2.462GHz...Wireless SSID broadcast should be Enabled and then click on Save Settings...
    Please make a note of Wireless Network Name (SSID) as this is the Network Identifier...
    For Wireless Security : -
    Click on the Sub tab under Wireless > Wireless Security...
    Change the Wireless security mode to WEP, Encryption should be 64 bit.Leave the passphrase blank, don't type in anything...
    Under WEP Key 1 type in any 10 numbers please(numbers only and no letters eg: your 10 digit phone number) and click on save settings...
    Please make a note of WEP Key 1 as this is the Security Key for the Wireless Network...
    Click on Advanced Wireless Settings
    Change the Beacon Interval to 75 >>Change the Fragmentation Threshold to 2304, Change the RTS Threshold to 2304 >>Click on "Save Settings"...
    5GHz Wireless Settings : 
    Wireless Network mode should be mixed...
    -Provide a unique name in the Wireless Network Name (SSID) box in order to differentiate your network from your neighbours network.
    Set the Radio Band to Wide-40MHz and change the Wide channel to159 and Standard Channel to 161-5.805GHz...
    For Wireless Security : -
    Click on the Sub tab under Wireless > Wireless Security...
    Change the Wireless security mode to WPA, For Encryption, select AES...For Passphrase input your desired WPA Key. For example , MySecretKey , This will serve as your network key whenever you connect to your wireless network. Do NOT give this key to anyone and remember the key.
    NOTE : Passphrase should be more that 8 characters...
    Now see if you can locate your Wireless Network and attempt to connect...

  • Is anyone else having problems with Office for Mac and Lion?

    Since installing Lion 10.7.1 on a macbook pro 2.53 Ghz 4GB 1067 MHz DDR3 I have had no end of problems. Both Excel and Word hang, crash and saving an Excel file is a pain. A 12mb spread sheet just took 4 minutes to save! I have MS Office for Mac 2011 version 14.1.3.
    Another problem that may not be related to Office is that opening Finder is so slow and most of the time it takes a minute to display folders in Desktop or Documents.
    Any suggestions would be welcome .. I regret installing Lion .. I had no problems with Snow Leopard!

    botro wrote:
    I'm unable to install the MS Office 14.1.3 update - I keep getting "Installation Failure"
    I have not found a solution on this board or Microsoft community
    This thread had some things to try.

Maybe you are looking for

  • Error when creating a DC in NWDI from a Local DC

    Hi Experts, I have created a Local DC using New -> Development Component Project. Now I am trying to Migrate the Local DC to NWDI DC. I am following the below steps to migrate. 1. I am creating a New DC by Importing Configuration and then the SC's th

  • How to determine line # from printstack() with cc compiler on Solaris 10

    Hi, printstack() when called produces a stack trace per the following: /lib/libc.so.1:0xc5364 /lib/libc.so.1:0xb9e64 /platform/sun4u-us3/lib/libc_psr.so.1:memcpy+0x660 [ Signal 11 (SEGV)] /opt_outside_local_disk/opt/zim/bin/program_name:function_name

  • Contract format issue

    Hello Experts, I am uploading contracts in CLM, but i am having a problem with format, I have two tokens together: <%Token1%><%Token2%>, this is the format I wanted for the token to have them together in one sentence, but when I uploaded the contract

  • Palm Desktop Private Memos cause crash

    I have been using a password on some of the Memos on the Palm Desktop (v4.2.0). Recently when I try to open a Private Memo by typing in a password, the password entry field shows vertical slots ie " IIIII " instead of the normal bullet dots. Then whe

  • Battery Monitor 2.2 not working after update to be...

    Before i updated to Belle, there was no issue with the battery monitor. But after i updated and then installed Battery Monitor, it is kind of stuck on the loading screen for a long long time. it just keeps loading and loading. Dunno what is going on.