Adding a JButton when there's a paint method

I'm creating a game application, sort of like a maze, and I want to add buttons to the levelOne panel to be able to move around the maze. When I add the buttons to the panel they don't appear, I assume the paint method is the reason for this. here's my code, I have 3 files, ill post the user_interface, and the levels class, where the level is created and where i tried to add the button. I tried putting the buttons in a JOptionPane, but then my JMenu wouldn't work at the same time the OptionPane was opened. If anyone knows a way around this instead, please let me know. I also tried using a separate class with a paintComponent method in it, and then adding the button (saw on a forum, not sure if it was this one), but that didn't work either. Also, if there is a way just to simply have the user press the directional keys on the keyboard and have the program perform a certain function when certain keys are pressed, I'd like to know, as that would solve my whole problem. Thanks.
//Libraries
import java.awt.*;
import java.io.*;
import java.util.*;
import javax.swing.*;
import java.awt.event.*;
import javax.swing.text.*;
public class User_Interface extends JFrame
static Levels l = new Levels ();
static Delay d = new Delay ();
private Container contentPane = getContentPane ();
private JPanel main, levelOne;
private String level;
private CardLayout cc = new CardLayout ();
private GridBagConstraints gbc = new GridBagConstraints ();
private JPanel c = new JPanel ();
private String label = "MainMenu";
public User_Interface ()
//Generates the User-Interface
super ("Trapped");
main = new JPanel ();
GridBagLayout gbl = new GridBagLayout ();
main.setLayout (gbl);
c.setLayout (cc);
// set_gbc (gbc, 2, 2, 5, 5, GridBagConstraints.NONE);
c.add (main, "Main Page");
contentPane.add (c, BorderLayout.CENTER);
cc.show (c, "Main Page");
levelOne = new JPanel ();
levelOne.setLayout (new GridBagLayout ());
levelOne.setBackground (Color.black);
c.add (levelOne, "LevelOne");
JMenuBar menu = new JMenuBar ();
JMenu file = new JMenu ("File");
JMenu help = new JMenu ("Help");
JMenuItem about = new JMenuItem ("About");
JMenuItem mainmenu = new JMenuItem ("Main Menu");
mainmenu.addActionListener (
new ActionListener ()
public void actionPerformed (ActionEvent event)
cc.show (c, "Main Page");
label = "MainMenu";
JMenuItem newGame = new JMenuItem ("New Game");
newGame.addActionListener (
new ActionListener ()
public void actionPerformed (ActionEvent event)
l.xCord = 2;
l.yCord = 2;
l.xLoc = 140;
l.yLoc = 140;
JPanel entrance = new JPanel ();
entrance.setLayout (new FlowLayout ());
c.add (entrance, "Entrance");
label = "Entrance";
level = "ONE";
cc.show (c, "Entrance");
JMenuItem loadgame = new JMenuItem ("Load Game");
JMenuItem savegame = new JMenuItem ("Save Game");
JMenuItem exit = new JMenuItem ("Exit");
exit.addActionListener (
new ActionListener ()
public void actionPerformed (ActionEvent event)
JFrame frame = new JFrame ();
frame.setLocation (10, 10);
JOptionPane.showMessageDialog (frame, "Come Back Soon!", "TRAPPED", JOptionPane.INFORMATION_MESSAGE);
System.exit (0);
file.add (about);
file.add (mainmenu);
file.add (newGame);
file.add (loadgame);
file.add (savegame);
file.add (exit);
menu.add (file);
menu.add (help);
setJMenuBar (menu);
//Sets the size of the container (columns by rows)
setSize (750, 550);
//Sets the location of the container
setLocation (10, 10);
//Sets the background colour to a dark blue colour
main.setBackground (Color.black);
//Makes the container visible
setVisible (true);
public void paint (Graphics g)
super.paint (g);
g.setColor (Color.white);
if (label == "MainMenu")
for (int x = 0 ; x <= 50 ; ++x)
g.setColor (Color.white);
g.setFont (new Font ("Arial", Font.BOLD, x));
g.drawString ("T R A P P E D", 100, 125);
d.delay (10);
if (x != 50)
g.setColor (Color.black);
g.drawString ("T R A P P E D", 100, 125);
if (label == "Entrance")
l.Entrance ("ONE", g);
label = "LevelOne";
if (label == "LevelOne")
l.LevelOne (g, levelOne, gbc);
label = "";
public static void main (String[] args)
// calls the program
User_Interface application = new User_Interface ();
application.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);
} //End of Main Method
//Libraries
import java.awt.*;
import java.io.*;
import javax.swing.*;
import java.awt.event.*;
public class Levels extends Objects
private JFrame frame = new JFrame ();
//Sets location, size, and visiblity to the frame where the JOptionPane
//will be placed
frame.setLocation (600, 600);
frame.setSize (1, 1);
frame.setVisible (false);
public int xCord = 2;
public int yCord = 2;
public void LevelOne (Graphics g, JPanel one, GridBagConstraints gbc)
***Trying to add the button, doesn't appear. Tried adding to the container, and any JPanel i had created***
JButton button1 = new JButton ("TEST");
one.add (button1);
g.setColor (Color.white);
g.fillRect (500, 100, 200, 300);
g.setColor (Color.black);
g.drawRect (500, 100, 200, 300);
g.setFont (new Font ("Verdana", Font.BOLD, 25));
g.setColor (Color.black);
g.drawString ("LEVEL ONE", 525, 80);
//ROW ONE
counter = -80;
counter2 = 200;
for (int a = 1 ; a <= 7 ; ++a)
if (xCord < a && yCord == 0)
g.setColor (darkGray);
g.fillRect (xLoc + counter, yLoc - 80, 40, 40);
g.setColor (Color.black);
g.drawRect (xLoc + counter, yLoc - 80, 40, 40);
if (xCord > a - 1 && yCord == 0)
g.setColor (darkGray);
g.fillRect (xLoc + counter2, yLoc - 80, 40, 40);
g.setColor (Color.black);
g.drawRect (xLoc + counter2, yLoc - 80, 40, 40);
counter += 40;
counter2 += 40;
*****Theres 9 more rows, just edited out to save space****
int y = 100;
int x = 100;
for (int a = 0 ; a < 20 ; ++a)
g.setColor (Color.white);
g.fillRoundRect (x, y, 40, 40, 5, 5);
g.setColor (Color.black);
g.drawRoundRect (x, y, 40, 40, 5, 5);
y += 40;
if (a == 9)
x += 320;
y = 100;
x = 140;
y = 100;
for (int a = 0 ; a < 14 ; ++a)
g.setColor (Color.white);
g.fillRoundRect (x, y, 40, 40, 5, 5);
g.setColor (Color.black);
g.drawRoundRect (x, y, 40, 40, 5, 5);
x += 40;
if (a == 6)
x = 140;
y += 360;
g.setColor (Color.black);
g.drawRect (100, 100, 360, 400);
ImageIcon[] images = new ImageIcon [4];
images [0] = new ImageIcon ("arrow_left.gif");
images [1] = new ImageIcon ("arrow_up.gif");
images [2] = new ImageIcon ("arrow_down.gif");
images [3] = new ImageIcon ("arrow_right.gif");
int direction = -1;
*****This is where I tried to have the OptionPane show the directional buttons******
//frame.setVisible (true);
// direction = JOptionPane.showOptionDialog (frame, "Choose Your Path:", "Trapped", JOptionPane.YES_NO_CANCEL_OPTION,
// JOptionPane.QUESTION_MESSAGE,
// null,
// images,
// images [3]);
// if (direction == 0)
// if (xCord - 1 > 0)
// xCord -= 1;
// xLoc += 40;
// if (direction == 1)
// if (yCord - 1 > 0)
// yCord -= 1;
// yLoc += 40;
// if (direction == 2)
// if (yCord + 1 < 9)
// yCord += 1;
// yLoc -= 40;
// if (direction == 3)
// if (xCord + 1 < 13)
// xCord += 1;
// xLoc -= 40;
//LevelOne (g, one, gbc);
}

i tried adding a keylistener, that didn't work too well, i had tried to add it to a button and a textarea which i added to the 'one' frame, it didn't show up, and it didn't work. How would i go about changing the paint method so that it doesn't contain any logic? That's the only way I could think of getting the program to move forward in the game. Thanks.
//Libraries
import java.awt.*;
import java.io.*;
import java.util.*;
import javax.swing.*;
import java.awt.event.*;
import javax.swing.text.*;
public class User_Interface extends JFrame
    static Levels l = new Levels ();
    static Delay d = new Delay ();
    private Container contentPane = getContentPane ();
    private JPanel main, levelOne;
    private String level;
    private CardLayout cc = new CardLayout ();
    private GridBagConstraints gbc = new GridBagConstraints ();
    private JPanel c = new JPanel ();
    private String label = "MainMenu";
    public User_Interface ()
        //Generates the User-Interface
        super ("Trapped");
        main = new JPanel ();
        GridBagLayout gbl = new GridBagLayout ();
        main.setLayout (gbl);
        c.setLayout (cc);
        // set_gbc (gbc, 2, 2, 5, 5, GridBagConstraints.NONE);
        c.add (main, "Main Page");
        contentPane.add (c, BorderLayout.CENTER);
        cc.show (c, "Main Page");
        levelOne = new JPanel ();
        levelOne.setLayout (new GridBagLayout ());
        levelOne.setBackground (Color.black);
        c.add (levelOne, "LevelOne");
        JMenuBar menu = new JMenuBar ();
        JMenu file = new JMenu ("File");
        JMenu help = new JMenu ("Help");
        JMenuItem about = new JMenuItem ("About");
        JMenuItem mainmenu = new JMenuItem ("Main Menu");
        mainmenu.addActionListener (
                new ActionListener ()
            public void actionPerformed (ActionEvent event)
                cc.show (c, "Main Page");
                label = "MainMenu";
        JMenuItem newGame = new JMenuItem ("New Game");
        newGame.addActionListener (
                new ActionListener ()
            public void actionPerformed (ActionEvent event)
                l.xCord = 2;
                l.yCord = 2;
                l.xLoc = 140;
                l.yLoc = 140;
                JPanel entrance = new JPanel ();
                entrance.setLayout (new FlowLayout ());
                c.add (entrance, "Entrance");
                label = "Entrance";
                level = "ONE";
                cc.show (c, "Entrance");
        JMenuItem loadgame = new JMenuItem ("Load Game");
        JMenuItem savegame = new JMenuItem ("Save Game");
        JMenuItem exit = new JMenuItem ("Exit");
        exit.addActionListener (
                new ActionListener ()
            public void actionPerformed (ActionEvent event)
                JFrame frame = new JFrame ();
                frame.setLocation (10, 10);
                JOptionPane.showMessageDialog (frame, "Come Back Soon!", "TRAPPED", JOptionPane.INFORMATION_MESSAGE);
                System.exit (0);
        file.add (about);
        file.add (mainmenu);
        file.add (newGame);
        file.add (loadgame);
        file.add (savegame);
        file.add (exit);
        menu.add (file);
        menu.add (help);
        setJMenuBar (menu);
        //Sets the size of the container (columns by rows)
        setSize (750, 550);
        //Sets the location of the container
        setLocation (10, 10);
        //Sets the background colour to a dark blue colour
        main.setBackground (Color.black);
        //Makes the container visible
        setVisible (true);
    public void paint (Graphics g)
        super.paint (g);
        g.setColor (Color.white);
        if (label == "MainMenu")
            for (int x = 0 ; x <= 50 ; ++x)
                g.setColor (Color.white);
                g.setFont (new Font ("Arial", Font.BOLD, x));
                g.drawString ("T    R    A    P    P    E    D", 100, 125);
                d.delay (10);
                if (x != 50)
                    g.setColor (Color.black);
                    g.drawString ("T    R    A    P    P    E    D", 100, 125);
        if (label == "Entrance")
            l.Entrance ("ONE", g);
            label = "LevelOne";
        if (label == "LevelOne")
            l.LevelOne (g, levelOne, gbc);
            label = "";
        //g.setColor (new Color
    public static void main (String[] args)
        // calls the program
        User_Interface application = new User_Interface ();
        application.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);
    } //End of Main Method
//Libraries
import java.awt.*;
import java.io.*;
import javax.swing.*;
import java.awt.event.*;
import javax.swing.ActionMap;
import javax.swing.plaf.*;
public class Levels extends Objects
    implements KeyListener
    //static final String newline = System.getProperty ("line.separator");
    JButton button;
    private JFrame frame = new JFrame ();
        //Sets location, size, and visiblity to the frame where the JOptionPane
        //will be placed
        frame.setLocation (600, 600);
        frame.setSize (1, 1);
        frame.setVisible (false);
    JButton button1;
    public int xCord = 2;
    public int yCord = 2;
    public void LevelOne (Graphics g, JPanel one, GridBagConstraints gbc)
    //    button = new JButton ("TEST");
    //    ButtonHandler handler = new ButtonHandler ();
     //   button.addActionListener (handler);
      //  one.add (button);
        g.setColor (Color.white);
        g.fillRect (500, 100, 200, 300);
        g.setColor (Color.black);
        g.drawRect (500, 100, 200, 300);
        g.setFont (new Font ("Verdana", Font.BOLD, 25));
        g.setColor (Color.black);
        g.drawString ("LEVEL ONE", 525, 80);
        //ROW ONE
        counter = -80;
        counter2 = 200;
        for (int a = 1 ; a <= 7 ; ++a)
            if (xCord < a && yCord == 0)
                g.setColor (darkGray);
                g.fillRect (xLoc + counter, yLoc - 80, 40, 40);
                g.setColor (Color.black);
                g.drawRect (xLoc + counter, yLoc - 80, 40, 40);
            if (xCord > a - 1 && yCord == 0)
                g.setColor (darkGray);
                g.fillRect (xLoc + counter2, yLoc - 80, 40, 40);
                g.setColor (Color.black);
                g.drawRect (xLoc + counter2, yLoc - 80, 40, 40);
            counter += 40;
            counter2 += 40;
        int y = 100;
        int x = 100;
        for (int a = 0 ; a < 20 ; ++a)
            g.setColor (Color.white);
            g.fillRoundRect (x, y, 40, 40, 5, 5);
            g.setColor (Color.black);
            g.drawRoundRect (x, y, 40, 40, 5, 5);
            y += 40;
            if (a == 9)
                x += 320;
                y = 100;
        x = 140;
        y = 100;
        for (int a = 0 ; a < 14 ; ++a)
            g.setColor (Color.white);
            g.fillRoundRect (x, y, 40, 40, 5, 5);
            g.setColor (Color.black);
            g.drawRoundRect (x, y, 40, 40, 5, 5);
            x += 40;
            if (a == 6)
                x = 140;
                y += 360;
        g.setColor (Color.black);
        g.drawRect (100, 100, 360, 400);
        ImageIcon[] images = new ImageIcon [4];
        images [0] = new ImageIcon ("arrow_left.gif");
        images [1] = new ImageIcon ("arrow_up.gif");
        images [2] = new ImageIcon ("arrow_down.gif");
        images [3] = new ImageIcon ("arrow_right.gif");
        int direction = -1;
        //frame.setVisible (true);
        // direction = JOptionPane.showOptionDialog (frame, "Choose Your //\Path:", "Trapped", JOptionPane.YES_NO_CANCEL_OPTION,
        //         JOptionPane.QUESTION_MESSAGE,
        //         null,
        //         images,
        //         images [3]);
        // if (direction == 0)
        //     if (xCord - 1 > 0)
        //         xCord -= 1;
        //         xLoc += 40;
        // if (direction == 1)
        //     if (yCord - 1 > 0)
        //         yCord -= 1;
        //         yLoc += 40;
        // if (direction == 2)
        //     if (yCord + 1 < 9)
        //         yCord += 1;
        //         yLoc -= 40;
        // if (direction == 3)
        //     if (xCord + 1 < 13)
        //         xCord += 1;
        //         xLoc -= 40;
        one.addKeyListener (this);
        // one.add (button1);
        if (xCord == 1)
            LevelOne (g, one, gbc);
    /** Handle the key typed event from the text field. */
    public void keyTyped (KeyEvent e)
    /** Handle the key pressed event from the text field. */
    public void keyPressed (KeyEvent e)
        if (e.getSource () == "Up")
            JOptionPane.showMessageDialog (null, "Hi", "Hi", 0, null);
    /** Handle the key released event from the text field. */
    public void keyReleased (KeyEvent e)
        // displayInfo (e, "KEY RELEASED: ");
}

Similar Messages

  • Paint() method is in infinite loop when focus is set to JTextPane

    Hi All,
    I am creating one JScrollPane, JPanel and JTextPane. JPanel is added to JScrollPane and JTextPane is added to JPanel. If I override paint() method in JPanel, its in infinite loop. I don't know why it is behaving like this. Can anyone solve my problem. Since, I am doing so much drawings in paint() method, its getting to slow.
    Here is the code what I wrote.
    import javax.swing.*;
    import javax.swing.border.*;
    import java.awt.*;
    import java.awt.event.*;
    public class TestTextPane1 extends JFrame {
         JPanel panel;
         JScrollPane pane;
         public TestTextPane1() {
              panel = new JPanel(new BorderLayout()) {
                   public void paint(Graphics g) {
                        super.paint(g);
                        System.out.println("inside paint");
              JTextPane textPane = new JTextPane();
              panel.add(textPane);
              pane = new JScrollPane(panel);
              getContentPane().add(pane);
              setSize(300, 200);
              setVisible(true);
         public static void main(String [] args) {
              new TestTextPane1();
    Any help will be useful for me.
    Regards
    Kishore.

    What are you trying to do? You are adding the textPane to the panel and then overriding the paint() method. The textPane will never be painted if you do this.
    In Swing, you should override the paintComponent() method, not the paint() method. See the Swing tutorial on Painting:
    http://java.sun.com/docs/books/tutorial/uiswing/overview/draw.html
    Don't forget to read the "Working With Graphics" link at the bottom.

  • Multiple paint methods

    Hi
    I'm working on a draughts game and to make it a little nicer looking I've used graphics for the board squares.
    My paint method is double buffered so when a peice is dragged it lags a little because it has to buffer so many images. The only images I need to buffer are the ones that move i.e. the draughts.
    Is there a way to draw the squares in a separate paint method so they don't get buffered? Or is java limited to one paint method per class?

    It's going to lag no matter how many paint methods you use. (Thats even if there ARE other paint methods) If it's lagging because of how many images must be drawn, then perhaps you should write an algorithm that repaints only the areas that have changed. ie: Only repaint wherever the single peice is moved.
    -Adam

  • Mixing a paint method and labels???

    Hi,
    I've got a panel which has a paint method which draws various shapes, it also has someJLabels. The problem is when i add this paint method to the class then all the JLabels disappear! If i remove it then they display as normal.
    Please can someone help
    Cath

    I think you should be overriding the paintComponent() method of the JPanel.
    Here is a link to a section in the Swing tutorial titled "Painting".
    http://java.sun.com/docs/books/tutorial/uiswing/overview/draw.html
    Don't forget to continue with the "Working with Graphics" link at the bottom. (This will explain why you should use paintComponent() method).

  • IPhone 4s has yahoo mail icon permanently on safari when there are no open pages

    My iPhone 4s using iOS7.0.2 has a Yahoo mail icon displaying permanently on the top of Safari when there are no open pages. The icon did not disappear even when I deleted my Yahoo mail account. The icon also has my Yahoo username displayed below it. Is there any way I can remove the Yahoo mail icon from permanently displaying on Safari? I cleared my history, cookies and data, but the Yahoo icon is still there.

    I have the same issue and koban4max's sugggestion doesn't work (well, it works, but you'll need to do it once a day.) I am surprised this hasn't been widely reported either as an iphone, Verizon or Yahoo issue. I tried various suggestions (deleting/re-adding account, moving messages to a new folder and changing password on computer/iphone, etc.) It will push for a while but stop pushing in a few hours or a few days. This leads me to believe somewhere in the interface corrupts the process. I would love to know if it's unique to Verizon, iphone 4S or IOS 5, or all of the above. The phone doesn't even fetch according to schedule, only when you are in the application. BTW, the Exchange push solution for Gmail works wonderfully.
    iphone 4S, IOS 5, Verizon.

  • How can I use some of the image i am working on to paint with? like if I wanted to give someone an extra eye in the forehead, ow could i then paint their own i in the forehead? I know there is a paint tool for that, i just can't find it ... :/

    How can I use some of the image i am working on to paint with? like if I wanted to give someone an extra eye in the forehead, ow could i then paint their own i in the forehead? I know there is a paint tool for that, i just can't find it ... :/

    It sounds like you are talking about the cloning tool?
    Tool looks like this:
    Then when selected you can change the size of the brush and using Alt (windows) and Command (Mac) to select your region you want to copy then start to create you cloned image.
    Hope this helps?

  • Firefox freezes when there are pop up boxes or any box you have to click on to type in information e.g Facebook comments, Firefox About window

    I have both the latest Firefox 3.6.12 and Adobe Flash. Firefox will freeze up for no apparent reason. It's most commonly happened when there's a box that needs text information adding into it (like the comments box on Facebook pages) or when a smaller window opens up like the save file/open with box, or even the About Firefox window. When this happens, I cannot enter text into the boxes or close the boxes or Save/Open file. The main browser window stays "greyed out" at the top, like it's inactive and I cannot type into the URL bar. Nor can I close the window, I have to CTRL-ALT-DEL to close the program and try again. THe only thing that's changed recently was the updates for both Firefox and Adobe Flash to the latest versions.

    I do not have that box checked... so now what?
    Thanks

  • Error In Displaying Message When There Is An Attachment

    I am trying to display an error message in SharePoint 2013. I added the following code
    inside my ItemAdding() event receiver to force it to have error:
    properties.Status = SPEventReceiverStatus.CancelWithError;
    properties.ErrorMessage = "test";
    It
    works okay, I can see the error message. 
    However, when I attach any files, and try again, after saving, the attachment will disappear.
    When I attach again, I will get a server error: 
    Please advise.

    Hi,
    According to your post, my understanding is that you wanted to display error message when there is an attachment.
    You need to add “properties.Cancel = true;” to your ItemAdding() event receiver.
    You can cancel the event using:
    properties.Status = SPEventReceiverStatus.CancelWithError;
    properties.Cancel = true;
    properties.ErrorMessage = "test";
    The properties.Cancel determines if the event should be cancelled.  The default is false but once you set it to true it will cancel the event when the current execution ends.
    Here is a similar thread for your reference:
    http://stackoverflow.com/questions/17828963/custom-error-message-for-event-receiver-in-sharepoint-2010
    More information:
    http://davehunter.co.uk/2009/03/12/sharepoint-event-receivers-by-example-email-validation/
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Avoid marking files as modified by Git when there are no changes

    Hello,
    I am working on a project using Visual Studio 2013 Ultimate and Enterprise Architect 9.0 (a UML tool). I am using Git for Source Control in Visual Studio.
    I have set up the programs so that I can synchronize code from Enterprise Architect (EA) to Visual Studio (VS) and vice versa using MDG Link for Visual Studio (an Enterprise Architect add-in). I first synchronized all the existing code from VS to EA.
    Now I have the following workflow:
    Create UML models in EA;
    Add necessary attributes and operations to the class models;
    Synchronize models with the code, which will add the added attributes and operations to my source;
    The last step will regenerate all my source code files, but even if there are no changes Git marks the files as modified.
    How can I avoid this behaviour, because now all my files are modified when Enterprise Architect synchronizes the model with the source code.
    I only want Git to mark it as modified when there are actually things added or modified in the file.
    Any help will be appreciated.
    Marcel

    Hi,
    I think it's more VS which detect the file was modified, and by default it mark the file as modified in Git. 
    But normally when you want to commit your work these files are removed because Git detect the files are not really changed.
    Did you try to refresh the pending changes in the team explorer (F5). Perhaps Git recalculate all the differences, and then detect the real changes.
    Regards,
    Yan Grenier
    Merci de bien vouloir "Marquer comme réponse", les réponses qui ont répondues à votre question, et de noter les réponses que vous avez trouvé utiles.

  • In iPhoto '11 I cannot change the book settings. For example, adding page numbers. There is no "option" button as is suggested by the help item.

    In iPhoto '11 I cannot change the book settings. For example, adding page numbers. There is no "option" button as is suggested by the help item. How can I change to book settings?

    The "options" button should appear at the bottom of the iPhoto window, when you view your book, then the Book Settings Button should be available and you can activate page numbers.
    But remember, that the settings available will depend on the Book Theme you selected. The above shows the settings for one of the "Travel" themes. In a Picture Book Theme, e.g. you cannot add page numbers.
    What theme and book size are you using?
    Regards
    Léonie

  • Firefox keeps freezing and using 50% cpu and memory usage shoots up most of the time it's when there's an auto update of anything addon, plugin or ff!

    Firefox keeps freezing and using 50% cpu and memory usage shoots up real fast and carries on going till it uses up all there is left. Most of the time it's when there's an auto update of anything addon, plugin or ff but not just neccessarily then! I find out it's happened when there's been an update after i restart and an extra webpage comes up with the particular addon/plugin/ff update. I have to restart most of time because nothing sorts it out. I'm using windows xp with the latest update of ff 13.0.1 it's not this version because it's been happening for a while. And it never started when i added a particular addon or plugin or when i added a new app to my pc either. Any idea as to what this may be or how i'd sort it out?
    Cheers

    Maybe disable hardware acceleration? This article should help: https://support.mozilla.org/en-US/kb/firefox-uses-too-much-memory-ram

  • Office jet 6700 printer jam error when there is no printer jam

    I get a continuous printer jam error when there is no jam present.  I have tried connecting and reconnecting.  Same error.

    Hi @lbrockhurst 
    Although you are not experiencing a true paper jam, the solutions presented in the following document might help to resolve the issue; A 'Paper Jam' Error Displays on the HP Officejet 6600 e-All-in-One and 6700 Premium e-All-in-One Pri...
    As you will see in the document above, paper jam messages are not only a result of physical paper jams;
    The following factors can cause paper jams:
    Paper loaded incorrectly in the paper tray.
    Damaged or dirty paper rollers.
    Torn, wrinkled, or damp paper loaded in the paper tray.
    The rear access door or two-sided printing accessory (duplexer) might not be closed or is not locked into place.
    Paper was added to a stack already in the tray while the HP product was printing.
    The tray contains more than one type of paper.
    The paper is jammed inside the HP product where you cannot see it.
    An obstruction is blocking the paper path.
    Torn pieces of paper from a previous jam are stuck in the product.
    The tray is too full.
    If printing on an envelope, the edges of the envelope are bent.
    I have also seen communication hiccups cause such error messages. This may sound silly, but if the issue persists, after completing the steps in the document I provided, let's leave the router on and unplug the power cable (NOTE: Do not reset the router.),  then do the same with the printer, and shut down the computer. After a full minute, plug the router back in, wait for it to fully power up, then plug the printer back in and wait for the wireless light to become solid. Once both the router and printer are on, go ahead and turn the computer back on. Doing this will refresh the network connection. 
    I hope this heps.
    Please click the Thumbs up icon below to thank me for responding.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Please click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution.
    Sunshyn2005 - I work on behalf of HP

  • How to replace sky when there are trees in the photo

    I have several photos taken outdoors with a dull sky. I also have several sky shots to supply the blue sky; with or without clouds. I know a couple of ways to do  that --as long as the horizon line is clear, such as roofs, etc.  My preferred method is to use a tool; e.g., Magic Wand, to select the sky area and then copy/paste a blue sky image using Ctrl+Shift+V command. This makes the copied sky inserted into the original image and I'm happy with the results.
    But when there are trees or other bushes between the camera and the sky, problems begin.  No matter how carefully I try to include all the "holes" in those trees, the end result contains white spots where the selected section failed to follow the tree "holes".  Anybody know how to fix these types of problems?  I am somewhat familiar with layers-- which I have tried to use to solve this problem.
    Using PSE-12 on Windows 8.1
    TIA,
    Pete Grant

    Pete,
    There are several ways to do this. In my experience the Alibony technique works well. You will be able to use your "good" sky pictures:
    Watch Lesson 12: Quick Colorless Sky Replacement | Alibony Lessons for Photoshop Elements Episodes | How To Videos | Bli…
    As I pointed out to you on June 5, 2014, this is how I do it after watching the Alibony video.
    Open your picture (A) (File>open), and open the replacement sky picture (B)
    On the sky picture (B), go to Select>all from the menu, then Edit>copy to place it on the clipboard
    Go back to your picture (A), then Edit>paste. The new sky (B) should come in on a new layer
    With the move tool, use the corner handles to reduce the size of the sky (B) to cover the old sky on (A)
    In the layers palette, set the blending mode of (B) to darken
    Set the foreground color chip to white
    Get the Gradient tool out of the toolbox, and drag a foreground to transparent, linear gradient from below up to the top of the tree line, while holding down the shift key.
    With a soft white brush, at reduced opacity, gently paint the horizon a bit, as we want the horizon to be a tad lighter than the rest of the sky.
    If necessary, add a few clouds with the Return to Eden set.

  • [svn] 4258: Bug: LCDS-522 - Add more configurable reconnect handling for connecting up again over the same channel when there is a connection failure /outage.

    Revision: 4258
    Author: [email protected]
    Date: 2008-12-08 16:33:17 -0800 (Mon, 08 Dec 2008)
    Log Message:
    Bug: LCDS-522 - Add more configurable reconnect handling for connecting up again over the same channel when there is a connection failure/outage.
    QA: Yes
    Doc: No
    Checkintests Passes: Yes
    Details:
    * Updates to configuration handling code and MXMLC code-gen to support new long-duration reliable reconnect setting.
    Ticket Links:
    http://bugs.adobe.com/jira/browse/LCDS-522
    Modified Paths:
    blazeds/trunk/modules/common/src/flex/messaging/config/ClientConfiguration.java
    blazeds/trunk/modules/common/src/flex/messaging/config/ClientConfigurationParser.java
    blazeds/trunk/modules/common/src/flex/messaging/config/ConfigurationConstants.java
    blazeds/trunk/modules/common/src/flex/messaging/config/ServicesDependencies.java
    blazeds/trunk/modules/common/src/flex/messaging/errors.properties
    Added Paths:
    blazeds/trunk/modules/common/src/flex/messaging/config/FlexClientSettings.java
    Removed Paths:
    blazeds/trunk/modules/core/src/flex/messaging/config/FlexClientSettings.java

    Remember that Arch Arm is a different distribution, but we try to bend the rules and provide limited support for them.  This may or may not be unique to Arch Arm, so you might try asking on their forums as well.

  • I want to change the color, of the jbutton, when pressing on.

    Hey,
    There was a mistake in my last topic what I meant was that I want to change the color, of the jbutton, when pressing on, after pressed.he has to get his old colour. Now I already can change between the colours, but not, when i press on it, and i keep it pressed. It stays the standard-colour: gray.
    Best regards
    Stefan Parijs

    use this method to setr color
    JButton1.setBackground(java.awt.Color.pink);
    for event use the mousePressed or mouseDragged as the case you desire, there are other events too like mouseClicked,mouseMoved, mouseReleased,mousewEntered,m mouseExited
    check any method that suit your requirement
    best of luck

Maybe you are looking for

  • Acknowledgement message for RFC

    Hello Everyone, I am having a scenario where my ABAP transaction invoke a async RFC on XI and sends message to a legacy system using a File Adapter and then updates one Z-table in SAP with appropriate status.XI processes the RFC Sender message and pu

  • Can't Get Java Applets

    When I log-on to my favorite website, I get only a map but no moving details. I was told that I need to get Java Applets. When I use, Windows, I have no problems. Any advice?

  • OLE Program works in debug mode fails when run from F8

    Hello, I have implemented a code from this forum for sending documents to printer, as below, but although it works well in debug mode, it fails when I execute directly from SE38? Any idea? Best Regards, Didem GUNDOGDU   CREATE OBJECT gs_word 'WORD.AP

  • Appcrash document framework.rpln adobe indesign cs6

    Hello everyone, when I open a file I get this string indesign "APPCRASH document framework.rpln" how do I fix? and a very important file, but does not open more, help me please

  • Capture MessageID in a Message Map

    I am trying to use a custom function within a message map to return the GUID assigned to the message.  I am trying to use the getMessageID() method that SAP provides; however, my message map does not compile.  I get the following error message: "cann