Using clone() with JLabel and JButtons

I need to find a way of making a duplicate copy of objects that extend JLabel and JButton. Do I need to implement the clone() methord manually, or is there a simpler way of doing this?

Use a BorderLayout as the main layout. Add the two tables to the WEST and EAST.
Create another panel using a different layout, maybe a vertical BoxLayout. Add the two buttons and then add this panel to the CENTER of the main panel.
The secret is to nest different panels with different layout managers to achieve your desired layout.

Similar Messages

  • Left- and right-justifying with dot leaders in JLabel and JButton

    Hi,
    I am developing checklists using JLabel and JButton components and want to finish up with the text in each component looking something like the following (each line is a separate button/label):
    ACTION No1............................RESPONSE No1
    ACTION No2............................RESPONSE No2
    ACTION No3............................RESPONSE No3
    The idea is to have the �Action� text left-justified and the �Response� text right-justified with dot-leaders as shown.
    Each text line will be put into its own fixed length label or button.
    I plan to construct a string from text blocks �ACTION No1� and �RESPONSE No1� and add the calculated, exact no of dots in between to fill the space.
    The text font can be fixed (e.g. Courier) or proportional (e.g. Arial).
    My question is how to calculate the number of dots to add to fill the space for different fonts and font sizes.
    I think that using FontMetrics could provide some help but am not sure how this would work.
    Can anyone help.
    Many tks
    John

    Hi,
    I've developed your suggested code further to enable selected JLabels to be toggled visible(true/false) by pressing a JButton.
    I'd like however that when a label is made invisible that the rest of the labels/buttons move up to fill the space left by the now invisible label and vice versa.
    How do I do this, can you enlighten me on a solution?
    Modified code included below. Not very elegant but serves to illustrate the point in question and only makes the label invisible.
    Many tks
    John
    package componentwierd;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class ComponentWierd extends JFrame implements ComponentListener, ActionListener {
        boolean isVisible = true;
        JLabel label2 = new JLabel();
        public ComponentWierd() {
            getContentPane().setLayout( new GridLayout(0, 1) );
            // Using my original suggestion
            JLabel label = new JLabel();
            label.setLayout(new BorderLayout());
            label.add(createWierdComponent());
            getContentPane().add(label);
            JButton button = new JButton();
            button.setLayout(new BorderLayout());
            button.add(createWierdComponent());
            button.addActionListener(this);
            getContentPane().add(button);
            // Using Font Metrics
            // JLabel label2 = new JLabel("Label2 West...Label2 East");
            label2.setText("Label2 West...Label2 East");
            label2.addComponentListener( this );
            getContentPane().add(label2);
            JButton button2 = new JButton("Button2 West...Button2 East");
            System.out.println(button2.getIconTextGap());
            button2.addComponentListener( this );
            button2.setVisible(true);
            getContentPane().add(button2);
        public void actionPerformed(ActionEvent e) {
            if (isVisible == true) {
                isVisible = false;
                label2.setVisible(false);
            } else if (isVisible == false) {
                isVisible = true;
                label2.setVisible(true);
        private JComponent createWierdComponent() {
            JPanel panel = new JPanel(new BorderLayout());
            panel.setOpaque( false );
            panel.add(new JLabel("Label WEST"), BorderLayout.WEST);
            panel.add(new JLabel("..............................................."));
            panel.add(new JLabel("Label EAST"), BorderLayout.EAST);
            return panel;
        public void componentResized(ComponentEvent e) {
            if (e.getComponent() instanceof JLabel) {
                JLabel component = (JLabel)e.getComponent();
                String text = component.getText();
                String fitText = fitText(component, text);
                component.setText( fitText );
            if (e.getComponent() instanceof JButton) {
                JButton component = (JButton)e.getComponent();
                String text = component.getText();
                String fitText = fitText(component, text);
                component.setText( fitText );
        private String fitText(JComponent component, String text) {
            // Calculate the total width for painting the text
            // (Not sure why I need the -8)
            Insets insets = component.getInsets();
            int availableWidth = getWidth() - insets.left - insets.right - 8;
            // Calculate the minimum width our text will take
            String start = text.substring(0, text.indexOf("."));
            String middle = "...";
            String end = text.substring(text.lastIndexOf(".") + 1);
            FontMetrics fm = getFontMetrics( component.getFont() );
            int startWidth = fm.stringWidth( start );
            int middleWidth = fm.stringWidth( middle );
            int endWidth = fm.stringWidth( end );
            int minimumWidth = startWidth + middleWidth + endWidth;
            // Add dots to fill out the extra space
            StringBuffer buffer = new StringBuffer(start);
            buffer.append(middle);
            if (minimumWidth < availableWidth) {
                String dot = ".";
                int dotWidth = fm.stringWidth( dot );
                int dots = (availableWidth - minimumWidth) / dotWidth;
                for (int i = 0; i < dots; i++) {
                    buffer.append( dot );
            buffer.append(end);
            String result = buffer.toString();
            return result;
        public void componentHidden(ComponentEvent e) {}
        public void componentMoved(ComponentEvent e) {}
        public void componentShown(ComponentEvent e) {}
        public static void main(String[] args) {
            ComponentWierd frame = new ComponentWierd();
            frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
            frame.setSize(200, 200);
            frame.setLocationRelativeTo( null );
            frame.setVisible(true);
    }

  • How to print JTextPane containing JTextFields, JLabels and JButtons?

    Hi!
    I want to print a JTextPane that contains components like JTextFields, JLabels and JButtons but I do not know how to do this. I use the print-method that is available for JTextComponent since Java 1.6. My problem is that the text of JTextPane is printed but not the components.
    I wrote this small programm to demonstrate my problem:
    import javax.swing.*;
    import javax.swing.text.*;
    import java.awt.*;
    import java.awt.print.PrinterException;
    public class TextPaneTest2 extends JFrame {
         private void insertStringInTextPane(String text,
                   StyledDocument doc) {
              try {
                   doc.insertString(doc.getLength(), text, new SimpleAttributeSet());
              catch (BadLocationException x) {
                   x.printStackTrace();
         private void insertTextFieldInTextPane(String text,
                   JTextPane tp) {
              JTextField tf = new JTextField(text);
              tp.setCaretPosition(tp.getDocument().getLength());
              tp.insertComponent(tf);
         private void insertButtonInTextPane(String text,
                   JTextPane tp) {
              JButton button = new JButton(text) {
                   public Dimension getMaximumSize() {
                        return this.getPreferredSize();
              tp.setCaretPosition(tp.getDocument().getLength());
              tp.insertComponent(button);
         private void insertLabelInTextPane(String text,
                   JTextPane tp) {
              JLabel label = new JLabel(text) {
                   public Dimension getMaximumSize() {
                        return this.getPreferredSize();
              tp.setCaretPosition(tp.getDocument().getLength());
              tp.insertComponent(label);
         public TextPaneTest2() {
              StyledDocument doc = new DefaultStyledDocument();
              StyledDocument printDoc = new DefaultStyledDocument();
              JTextPane tp = new JTextPane(doc);
              JTextPane printTp = new JTextPane(printDoc);
              this.insertStringInTextPane("Text ", doc);
              this.insertStringInTextPane("Text ", printDoc);
              this.insertTextFieldInTextPane("Field", tp);
              this.insertTextFieldInTextPane("Field", printTp);
              this.insertStringInTextPane(" Text ", doc);
              this.insertStringInTextPane(" Text ", printDoc);
              this.insertButtonInTextPane("Button", tp);
              this.insertButtonInTextPane("Button", printTp);
              this.insertStringInTextPane(" Text ", doc);
              this.insertStringInTextPane(" Text ", printDoc);
              this.insertLabelInTextPane("Label", tp);
              this.insertLabelInTextPane("Label", printTp);
              this.insertStringInTextPane(" Text Text", doc);
              this.insertStringInTextPane(" Text Text", printDoc);
              tp.setEditable(false);
              printTp.setEditable(false);
              this.getContentPane().add(tp);
              this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              this.setSize(400,400);
              this.setVisible(true);
              JOptionPane.showMessageDialog(tp, "Start printing");
              try {
                   tp.print();
              } catch (PrinterException e) {
                   e.printStackTrace();
              try {
                   printTp.print();
              } catch (PrinterException e) {
                   e.printStackTrace();
         public static void main(String[] args) {
              new TextPaneTest2();
    }First the components are shown correctly in JTextPane, but when printing is started they vanish. So I created another textPane just for printing. But this does not work either. The components are not printed. Does anybody know how to solve this?
    Thanks!

    I do not know how I should try printComponent. From the API-Doc of JComponent of printComponent: This is invoked during a printing operation. This is implemented to invoke paintComponent on the component. Override this if you wish to add special painting behavior when printing. The method print() in JTextComponent is completely different, it starts the print-job. I do not understand how to try printComponent. It won't start a print-job.

  • Help with JLabels and JTextFields

    I'm experimenting with JLabels and JTextFields in a basic JFrame. What I am trying to accomplish (without success) is to align a JLabel above and centered on a JTextField. The tutorials are confusing me. Any help would be greatly appreciated. a Sample of code is ...
    JLabel  myTextLabel = new JLabel("Who's text Field?");
    JTextField myTextField = new JTextField("My Text Field");...after reading the tutorial I thought that I needed to assign L&F variables to the JLabel ... i.e.
    JLabel myTextLabel = new JLabel("Who's text field?:", JLabel.CENTER, JLabel.TOP); but this results in an error when compiling. (cannot find symbol), so I thought I need to assign the JLabel to the JTextField. i.e.
    myTextLabel.setLabelFor(myTextField);Then I get "identifier" expected. So now being completely confused I am here asking "How do I?" :)
    Thanks in advance!

    Most likely, you need to think a little more about using a layout manager to hlp you along the way. If memory serves, the default layout manager for a JPanel is FlowLayout and that will simply place the components you add to the panel one after another and allow each to adopt it's preferred size.
    One way to ensure that the two compoenets were sized equally, would be to use the GridLayout layout manager and create either one row with two columns, or two rows with one column on each. Then add the compoennets to each of the 'cells' so to speak and that should ensure that they are both the same size.
    As to making the text centered in each, both the JLabel and JtextField classes have amethod called setHorizontalAlignment(); it can be used to aligh the text as you require.
    Simply create an instance of the class;
    JLabel aLabel = new JLabel("Some Text");
    // Then set the alignment
    aLabel.setHorizontalAlignment(SwingConstants.CENTER);Or, do the whole operation i one step
    JLabel aLabel = new JLabel("Sone Text", SwingConstants.CENTER);and then add the componenet to the panel once you have set the layout manager.
    Remember that the label.textfield will have to be wide enought to make it obvious that the text is centered!

  • How do I chance the place of JLabel and JButton in JPanel.

    I'm using DefaultLayout and I want to give the user the ability to change the place of JLabel and JButton. I managed the DnD part, but when "dropped" the control returns to it's original position.
    I tried using setX() and setY().

    You need to use a null Layout, also known as [url http://java.sun.com/docs/books/tutorial/uiswing/layout/index.html]Absolute Positioning

  • Any Problems using SSL with Safari and the move with Internet explorer to require only TLS encryption.

    Any Problems using SSL with Safari and the move with Internet explorer to require only TLS encryption.

    Hi .
    Apple no longer supports Safari for Windows if that's what you are asking >  Apple apparently kills Windows PC support in Safari 6.0
    Microsoft has not written IE for Safari for many years.

  • Using url with username and password in URL class

    Hi,
    I'm writting an applet in which I use getAppletContext().showDocument with an URL.
    The problem is that I'm using URLs with username and password (http://user:[email protected]/page) and it isn't working because the browser is getting the URL http://user/page.
    Is this a bug in the URL class? Or in the showDocument method?
    Is there any way to make this work?
    Thanks for any help,
    Pedro Prospero Luis ([email protected])

    I'm not sure whether this is supported behaviour. I've had this syntax fail to work in the Netscape address bar so I can't recommend it as an approach for authentication.
    If you want to authenticate the user before redirecting to the page, though, you could try creating a connection to another page on the same server and sending the authorization information then. Your browser may then be successfully authenticated.
    See http://www.javaworld.com/javatips/jw-javatip47.html for information on this.
    You might not need to read back the page from the server, just connect to it. Might work.

  • Hello, I'm using ubuntu with firefox5 and can not find the option to import my bookmarks file backup

    Hello, I'm using ubuntu with firefox5 and can not find the option to import my bookmarks file backup

    Is that Ubuntu 11.04?
    Ubuntu 11.04 displays window menus in the control bar at the top of the screen<br />
    Click on Bookmarks/Show All Bookmarks then move your mouse to the left upper corner toward Firefox Web Browser.<br />
    You'll get pop up menu (Organize, Views and Import and Backup).<br />

  • Color of JLabel and JButton text

    Hi,
    Could someone tell me how to set the color of JLabels and JButton text.
    Thanks

    for JButton text
    myButton.setForeground(Color.yellow);
    for JLabel
    myLabel.setForeground(Color.green);

  • After itunes finishes restoring my ipod touch 8gb, itunes still says itunes has detected an ipod touch recovery mode. You must restore it before using it with itunes. and i dont knwo what to do

    after itunes finishes restoring my ipod touch 8gb, itunes still says itunes has detected an ipod touch recovery mode. You must restore it before using it with itunes. and i dont know what to do

    Are you sure it is 1043? I've never seen that error before. But you can try disabling your security software, connecting the phone to a USB port directly on the computer (not a hub), and trying to restore again.

  • Creating a gridlayout of jlabels and jbuttons in a JPanel

    The assignment:
    "Create a JPanel that contains an 8x8 checkerboard. Make all of the red squares JButtons and be sure to add them to the JPanel. Make all of the black squares JLabels and add them to the JPanel. Don't forget, you must use the add method to attach the JPanel to the JApplet's contentPane but that there is no contentPane for a JPanel. Be sure to set up any interfaces to handle the JButtons. Use a GridLayout to position and size each of the components instead of absolute locations and sizes."
    This assignment introduces the JPanel to me for the first time, I have not seen what the JDialog and JFrame are.
    What I have:
    import java.awt.*;
    import javax.swing.*;
    * Class CheckerBoard - write a description of the class here
    * @author (your name)
    * @version (a version number)
    public class CheckerBoard extends JPanel
        JButton redSquare;
        JLabel blackSquare;
         * Called by the browser or applet viewer to inform this JApplet that it
         * has been loaded into the system. It is always called before the first
         * time that the start method is called.
        public void init()
            JPanel p = new JPanel();
            setLayout(new GridLayout(8,8));
            setSize(512,512);
            ImageIcon red = new ImageIcon("GUI-006-RedButton.png");
            ImageIcon black = new ImageIcon("GUI-006-BlackSquare.png");
            blackSquare = new JLabel(black);
            blackSquare.setSize(64,64);
            redSquare = new JButton(red);
            redSquare.setSize(64,64);
            for (int i = 0; i < 64; i++) {
                if ((i % 2) == 1)
                    add(blackSquare);
                else
                   add(redSquare);
            // this is a workaround for a security conflict with some browsers
            // including some versions of Netscape & Internet Explorer which do
            // not allow access to the AWT system event queue which JApplets do
            // on startup to check access. May not be necessary with your browser.
            JRootPane rootPane = this.getRootPane();   
            rootPane.putClientProperty("defeatSystemEventQueueCheck", Boolean.TRUE);
    }After successfully compiling it when I try to run it there appears to be nothing to run. I've tried messing around with content panes but I'm not sure if I need to add one for this assignment at all.

    Some suggestions:
    1) First and foremost, read about JPanels, JApplets, and JFrames. None of the help you can get here will substitute for your applying yourself towards this, absolutely none, and judging by your code, you have your work cut out for you.
    2) Don't have your JPanel initialize with an init method, that's what Applets and JApplets do. Instead have it initialize with a proper constructor.
    3) I'm wondering if your "workaround" code belongs in the JApplet that contains the JPanel and not in the JPanel. It has nothing to do with the JPanel's mission. For instance, what if you later decide to place this panel into a JFrame?
    4) Avoid "setSize", and if at all possible, use "setPreferredSize" instead. You are working with LayoutManagers who do the size setting. You are best served by suggesting the size to them.
    5) Please ask specific questions. Just dumping your code without a question is considered quite rude here. We are all volunteers. If you want our free advice, you really should be considerate enough to make it easy for us to help you.
    Good luck.
    Edited by: Encephalopathic on Dec 21, 2007 6:14 PM

  • Having probelm with JLabel and setText

    I posted a message in Java Programming but I think it will be more appropriate here. I am trying to create a calculator so I want my JLabel(output) to display the number of the button that is clicked on. I used output.setText("7") but I get an error when compiling saying <identifier> expected. Any advice would be great. Also, is there a getText method in JLabel? I need to concatenate the current contents of JLabel and the value of the button pushed. For example:
    output.setText( output.getText() + "7" );
    Anyways, here is my code. I tried to make it indent so it is easier to read but it doesn't show up once I post it.
    Thanks for you help.
    * Write a description of class calculator here.
    * @author (Jeremy Kruer)
    * @version (11/19/02)
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class calculator extends JFrame
    private JButton one, two, three, four, five, six, seven, eight, nine, zero, dec, eq, plus, minus, mult, div;
    private JLabel output;
    private Container container;
    //set up GUI
    public calculator()
    //Create Title
    super("Calculator");
    //Set size and make visible
    setSize( 400, 400 );
    setVisible( true );
    container = getContentPane();
    container.setLayout( new FlowLayout() );
    //set up output
    output = new JLabel();
    container.add( output );
    //set up seven and register its event handler
    seven = new JButton( " 7 " );
    seven.addActionListener(
    //anonymouse inner class
    new ActionListener()
    //add a seven to the output diplay when clicked
    output.setText( "7" );
    }//end anonymouse inner class
    ); //end call to addActionListener
    container.add( seven );
    //set up eight
    eight = new JButton( " 8 " );
    container.add( eight );
    //set up nine
    nine = new JButton( " 9 " );
    container.add( nine );
    //set up div
    div = new JButton( " / " );
    container.add( div );
    //set up four
    four = new JButton( " 4 " );
    container.add( four );
    //set up five
    five = new JButton( " 5 " );
    container.add( five );
    //set up six
    six = new JButton( " 6 " );
    container.add( six );
    //set up mult
    mult = new JButton( " * " );
    container.add( mult );
    //set up one
    one = new JButton( " 1 " );
    container.add( one );
    //set up two
    two = new JButton( " 2 " );
    container.add( two );
    //set up three
    three = new JButton( " 3 " );
    container.add( three );
    //set up minus
    minus = new JButton( " - " );
    container.add( minus );
    //set up zero
    zero = new JButton( " 0 " );
    container.add( zero );
    //set up dec
    dec = new JButton( " . " );
    container.add( dec );
    //set up eq
    eq = new JButton( " = " );
    container.add( eq );
    //set up plus
    plus = new JButton( " +" );
    container.add( plus );
    //Set size and make visible
    setSize( 220, 250 );
    setVisible( true );
    //execute application
    public static void main( String args[] )
    calculator application = new calculator();
    application.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );

    // not tested but try it ...
    1. put an empty string into the JLabel
    declare
    String labString = "";
    (and declare the JLabel too)
    2. initialise label - init() {
    myLabel = new JLabel(labString)
    3. activate
    actionPerformed(ActionEvent evt) {
    if (evt.getSource()==button#7) {
    labString = getActionCommand();
    myLabel.setText(labString);
    validate();
    Something like that anyway - it should work + if you 'play' with it, you can probably make it a bit more efficiently than the methods I've outlined here.

  • FlowLayout and Jlabels and Jbuttons,  Help!!!!!

    Ok, I have an Assignment using the FlowLayout only!!. I have been readin all the tutorials and documentation regarding the FlowLayout. Yet it seems I have a problem. Within my prrogram I am to position the buttons on the right and postion the text on the left.
    My question is: Is there a way to postion each component separtely using FlowLayout. Can yoo position the Jlabels to the left and the JButtons to the right?
    I know other layouts would be easier but our proffessor wants us to use the flowlayout for this assignment.
    Here is my code
    import javax.swing.*;
    import java.awt.*;
    import java.awt.FlowLayout;
    import java.awt.Font;
                   public class VideoStore extends JFrame {
                        JButton b1, b2, b3;
                        JLabel movie1,movie2,movie3,header;
                   public VideoStore (String title) {
                        super (title);
                        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                        FlowLayout video = new FlowLayout(FlowLayout.LEFT);
                       setLayout(video);
                        header = new JLabel("CCAC VideoStore");
                        header.setFont(new Font("Times New Roman", Font.BOLD, 24));
                       add(header);
                       {movie1= new JLabel("Johnson Family Vacation");
                       movie1.setFont(new Font("Courier New", Font.BOLD, 14));
                        add(movie1);
                        b1= new JButton("Buy");
                        video.setAlignment(FlowLayout.RIGHT);
                        add(b1);}
                        movie2= new JLabel("PitchBlack");
                            movie2.setFont(new Font("Courier New", Font.BOLD, 14));
                       add(movie2);
                        b2 = new JButton ("Buy");
                        add(b2);
                        movie3= new JLabel ("Meet The Fockers");
                       movie3.setFont(new Font("Courier New", Font.BOLD, 14));
                       add(movie3);
                        b3 = new JButton ("Buy");
                        add(b3);
                   }Edited by: ConfusedNewb on Apr 20, 2010 8:10 AM

    ConfusedNewb wrote:
    Sorry.Requirements are: All of the "Buy" JButtons need aligned to the right and all of the JLabels need aligned to the left. There are 3 movie Jlabels and 3 jbuttons. I just cant get them to align without using the spacing trick. Everything has to fit in one window.This should be layed out with 2 JPanels, one for the Labels and one for the Buttons. Since FlowLayout will lay the 2 JPanels side by side, you will get the separation that you need. You just need to justify the Label and Button Panels appropriately and make the outer container and Panels appropriate widths to allow the layout to function as you need.

  • JLabel and JButton

    I got my clock hands issue figured out, now I am trying to get a JButton and JLabels and JTextboxes in. I think I have the code for the labels right, but nothing shows up....any suggestions or places for me to look for help?
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import javax.swing.*;
    public class clocky extends Frame {
         public static void main(String args[])
                   Frame frame = new clocky();
                   frame.addWindowListener(new WindowAdapter(){
                   public void windowClosing(WindowEvent we){
                             System.exit(0);
                   frame.setSize(300, 300);
                   frame.setVisible(true);
         private void createButton()
              JButton button = new JButton("Show Time");
         private void labels()
         JLabel hourLabel = new JLabel("Hour: ", JLabel.LEFT);
         hourLabel.setVerticalAlignment(JLabel.TOP);
         JLabel minLabel = new JLabel("Minute: ", JLabel.LEFT);
         minLabel.setVerticalAlignment(JLabel.TOP);
         final int centerX = 150;
         final int centerY = 180;
         Shape circle = new Ellipse2D.Double(50, 80, 200, 200);
         public void paint(Graphics g)
              Graphics2D ga = (Graphics2D)g;
              ga.draw(circle);
              //mins hand 6
              //ga.drawLine(150, 90, centerX, centerY); //00     +90 -90
              ga.drawLine(240, 180, centerX, centerY); //15      +90 +90
              //ga.drawLine(150, 270, centerX, centerY); //30      -90 +90
              //ga.drawLine(60, 180, centerX, centerY); //45      -90 -90
         //hrs hand 2.66666666
              ga.drawLine(150, 140, centerX, centerY); //00          +40 -40
              //ga.drawLine(190, 180, centerX, centerY); //15           +40 +40
              //ga.drawLine(150, 220, centerX, centerY); //30           -40 +40
              //ga.drawLine(110, 180, centerX, centerY); //45           -40 -40
    }

    >
    I got my clock hands issue figured out, now I am trying to get a JButton and JLabels and JTextboxes in. I think I have the code for the labels right, >You have methods to create buttons and labels, but nothing calls those methods, and even if hey were called, the created components are added to no container, and are lost at the end of the method.
    >
    ..but nothing shows up....>Wrong, the clock face painted directly to the JFrame shows. And that brings me to the second point. If you added those components to a frame that overrides paint, they will disappear. Once you override paint, it is up to you to paint everything that needs painting.
    This is why I would rethink your entire strategy. Override paintComponent(Graphics) in a ClockFace that extends JPanel. ClockFace should also set or override the preferred size. Then add the ClockFace object to another JPanel(s) (e.g. mainPanel) containing the JButton(s), JLabel(s) and ClockFace. Finally, add an EmptyBorder around mainPanel, and set it as the content pane of the JFrame.
    And please remember to use the 'code' tags to keep code formatted. To achieve that, select the code and click the CODE button seen on the Plain Text tab of the message posting form.

  • I can't seem to see sync my mac and iphone using iCloud with numbers and pages how can i correct this?

    Hi
    I've used Numbers and Pages for IOS for sometime now and when i use safari to look at my icloud account i can see all my files. Recently i bought Numbers for Mac and now whenever i create a spreadsheet on my mac i can't see it on my iphone but i can if i login to icloud. In fact i can only see about 16 files on my iphone when there is over 40 files.
    Although i don't yet have pages for mac i now have a similar problem with Pages, whenever i edit a file or even create a file on IOS it doesn't appear in icloud.
    I did think it was something to do with me not selecting backup to icloud so i then spent £14 to upgrade my storage to 15GB and that hasn't helped.
    I've checked all the settings and can't see anythng that will cause the problem.
    My iphone is running IOS 6 and my Mac is running Mountain Lion 10.8.2
    Does anyone know how to correct this mess?
    Many thanks in advance.
    Mick.

    Problems with buttons and links at the top of the page not working can be caused by an extension like the Yahoo! Toolbar or a Babylon extension that extents too much downwards and covers the top part of the browser window and thus makes links and buttons in that part of the screen not clickable.
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do not click the Reset button on the Safe mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode

Maybe you are looking for