Strange JFrame border

Hi everybody,
This isn't technically a problem, just something weird going on with my JFrame that I don't quite understand. My JFrame has a JLabel added to the north panel, and a JPanel with 3 JButtons in a 3-column GridLayout added to the south panel. When the frame renders, the little gray default border around the JFrame is the same width all the way around, except for on the right side of the button panel, where it's a little wider, so it looks like the JLabel in the top panel is longer than the button panel. It's not really a big deal, but I was just curious, what could cause this to happen? I've never seen anything like this before.
Any explanation would be great, and thanks!
Jezzica85

Ah, yes, the good old self-contained program. I was hoping we wouldn't need one this time, but I guess I should just make a habit of it.
Anyway, here it is:
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.GridLayout;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
public class Test {
     public static void main(String args[]) {
          try {
               JFrame frame = new JFrame( "Test" );
               frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
               frame.setLayout( new BorderLayout() );
               frame.setSize( 700, 500 );
               // Create main label
               JLabel label = new JLabel( "  Test  " );
               label.setBackground( Color.black );
               label.setForeground( Color.lightGray );
               label.setHorizontalAlignment( SwingConstants.CENTER );
               label.setOpaque( true );
               frame.add( label, BorderLayout.NORTH );
               // Create button panel and buttons
               JPanel panel = new JPanel( new GridLayout( 0, 3 ) );
               for( int i = 0; i < 3; i++ ) {
                    JButton button;
                    if( i == 0 ) {
                         button = new JButton( "I" );
                    } else if( i == 1 ) {
                         button = new JButton( "II" );
                    } else {
                         button = new JButton( "III" );
                    button.setOpaque(true);
                    button.setBackground(Color.pink);
                    panel.add( button );
               frame.add( panel );
               frame.setLocationRelativeTo( null );
               frame.setVisible( true );
          } catch( Exception e ) { e.printStackTrace(); }
}I made the label and buttons colored so you can see the right border more clearly and see what the problem is.
Thanks!
Jezzica85

Similar Messages

  • How we can change JFrame Border Color Not Background.

    How we change jframe border color not background
    if any body know about that then plz tell me
    at this [email protected]
    i m thanksfull to ..... .

    hi Shafr
    beleive it or not, i got it using trial and error. i keep
    trying words in the function setStyle until the color changed. i
    dont know why it is not documented.
    var periodBarColor:SolidColor = new
    SolidColor(taskSchedColorChooser.selectedColor, 1);
    periodBar.setStyle("fill",periodBarColor);
    //where taskSchedColorChooser is colorPicker component. you
    can replace it by any color you want

  • Strange JFRAME behaviour under Jdk 1.5

    I have the following extracted code :
    import java.util.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.border.*;
    import java.awt.geom.*;
    public class DrawPie extends JFrame{
         private HashMap ColourMap=new HashMap();;
         private HashMap DataMap=new HashMap();
         private double Total_Val=0;
         private int startAngle=0;
         private int arcAngle=0;
         public DrawPie(HashMap DataMap){
         super ("Pie Chart Analysis");
              this.DataMap=DataMap;
         //     System.out.println("DATAMap-->"+DataMap);
         // getContentPane().setBackground(Color.white);
              setSize(500,500);
              setVisible(true);
         public void paint(Graphics g){
              super.paint (g);
              Graphics2D g2 = (Graphics2D) g;
              DrawPieChart(g);
    This programme work fine under jdk1.4.2 or below at the time when the Jframe or windows is resized or icon minimised or maximised.
    But when it was compiled using latest jdk1.5 , unexpected strange result happen , the pie chart draw using java 2d
    g2.fill(new Arc2D.Double(30, 30, 200,200,startAngle,arcAngle
    , Arc2D.PIE));
    wil behaved strangely, the moment the JFrame or windows is resize or dragged.
    The pie chart will disappear if the windows is resized , However if the window is minimised and restore back to normal size , pie chart will reappear and subsequently lost completely if the windows is dragged resulted in the size changes.
    I was puzzled by this strange swing behaviour , any resized or windows minimise or maximise would not result in the lost of pie chart as long as the jdk is not 1.5 ! Was it due to swing fundamental changes incorporated in the latest release?
    Any suggestion?
    Thank

    ok I see what you have done,
    now a few tips in drawing something on your frame:
    never override the paint method of your main Frame (like you did)
    to draw something on it you simply override the contentPane's paint method
    and to make your own contentPane you simply make one by making a new Class
    that extends say JPanel and assign it as a contentPane of your Frame(like I did)
    And in this Paint method you can draw whatever you like it will be properly uptated!!!
    All the best keep up the good work!
    ps. try the code bellow.
    import javax.swing.*;
    public class DrawPie1 extends JFrame {
    private double Total_Val=0;
    private int startAngle=0;
    private int arcAngle=0;
    private MyMainPanel mainPan;
    public DrawPie1()
    super ("Pie Chart Analysis");
    mainPan = new MyMainPanel();
    setContentPane(mainPan);
    //public void paint(Graphics g) //Do not override the paint method of your main frame!!
    // super.paint (g);
    // Graphics2D g2 = (Graphics2D) g;
    // g2.setPaint(Color.red);
    // g2.fill(new Arc2D.Double(30, 30, 200,200,0,78
    // , Arc2D.PIE));
    public static void main(String args[])
    DrawPie1 pie=new DrawPie1();
    pie.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    pie.setSize(400,300);
    pie.setVisible(true);
    //**** Second Class
    import javax.swing.*;
    import java.awt.*;
    import java.awt.geom.Arc2D;
    public class MyMainPanel extends JPanel
    public MyMainPanel()
    public void paint(Graphics g)
    super.paint (g);
    Graphics2D g2 = (Graphics2D) g;
    g2.setPaint(Color.red);
    g2.fill(new Arc2D.Double(30, 30, 200,200,0,78
    , Arc2D.PIE));
    }

  • Strange image border / bright edges on full screen preview

    Hi,
    I'm getting strange image borders on full screen preview. I've taken a photo to show this effect. Its noticebly wider on the left and right edges compared to top and bottom. Anyone know how to turn this border off?
    http://www.oriontransfer.co.nz/Projector/IMG_2307.jpg
    I've often noticed it, but its become more of a problem because I've just bought a 720p projector to display some photographs. I think the low resolution exacerbates the problem.
    Regards,
    Samuel

    I've added one more image of the top right hand corner. I've boosted the contrast to clearly show the problem. This problem is not just on the projector, it can also be seen on my new MacBook Pro LCD screen.
    http://www.oriontransfer.co.nz/Projector/IMG_2305.jpg

  • How to find JFrame border width?

    Hi, I need to find out the left & right border widths of a JFrame. This is easy if I have an existing object (assuming it's been painted at least once).
    The border width may vary depending on the current look & feel, whether running on windows or the MAC, etc.
    I want to find out this value without creating an instance of JFrame. So I thought I'd try the UIManager, and I thought I'd need something like this:
    javax.swing.border.Border b = javax.swing.UIManager.getBorder("InternalFrame.border");But of course that's for InternalFrames, not JFrames.
    I can't figure this out - any ideas?
    Thanks, TL
    PS. Plse don't ask why I need to know this width ;-)

    So why do you need to know those widths?
    sigh
    Ok, like I said in my original post I really want to be able to do this. I'm disappointed that there's mostly questions 'why do you want to know' rather than workable solutions to the problem.
    What say I wanted to have a console application to give me all these values, for the current platform and look & feel? Pretty ugly momentarily popping up a JFrame so I can get these widths.
    But anyway here's the reason and I'm bracing for the inevitable 'you should not do that'.
    I want to choose the size of some components to go on a panel (and if you draw it with some initial defaults and repaint immediately after the first draw, it looks pretty ugly).
    We have a JList with a custom row renderer - each row has a number of columns in it, each to be defined as a percentage of the total width, so the renderer is a JPanel with all these things on it. (For several reasons a JTable was not appropriate, not the least of which the data needs to be displayed and manipulated as a list... although the underlying data IS in a TableModel.)
    I literally spent days trying to make the custom row renderer work as we needed it, using standard layouts - tried gridbaglayouts, but this doesn't support percentage widths (the weighting factors are a hindrance if there's no text in one column but lots in another, etc); other layout managers such as a box layout nicely give me a number of columns, but they are all equally spaced (no good if you want one to be 10% of the total width, and the next to be 50%...). And so the issues go on with the other standard layouts.
    Anyway, none of the standard java layout managers would do what we wanted and I didn't find one on the 'net to fit the job (at least not one under LGPL) - unless I missed one. So we resorted to absolute positioning. This works perfectly, and we also listen for window resize events - that works very well also. The trouble is, when INITIALLY sizing a column, we need to make it a percentage of the width. What is the 'useable width'? When we initially construct the window we know how big we're making the it, and if the frame is maximised then that's easy, the left & right borders are zero width. However that's under XP and with the current look & feel, so it isn't guaranteed. Similarly it the initial window size is not full-screen, there are most likely some borders, so how wide are they?
    Right, the best suggestion so far is for the use of pack(). We generally don't need to do this as we have a set of core frame classes which manage their sizes (and do it consistently throughout the application), and don't use pack(). However in this case, calling pack() before adding all the components of the JPanel will populate the border widths if applicable. However some changes I've just made to accomodate some MAC quirks means that a resize event occurs on startup anyway, and this seems to have largely solved the problem.
    However, I'd still like to know the answer to my original question. And I thought the answer may lie in asking the UIManager, but haven't found a setting in there for this purpose...

  • Strange Blue Border on rollovers?

    I have just moved over to CS3 and was trying to place a
    rollover into my table but DW keeps putting a blue border around
    the cell in the table and throws off the table completely plus it
    is still visible when I preview in the browser. I never had this
    problem in other versions, can anyone help?

    denise mcevoy wrote:
    > I have just moved over to CS3 and was trying to place a
    rollover into my table
    > but DW keeps putting a blue border around the cell in
    the table and throws off
    > the table completely plus it is still visible when I
    preview in the browser.
    Previous versions of Dreamweaver automatically put border="0"
    in the
    <img> tag of images used as links. This is deprecated
    code, so CS3 no
    longer does it.
    You have two options:
    1. Select the image in Design view, and insert 0 in the
    Border field of
    the Property inspector.
    2. Alternatively, create the following style rule in your
    style sheet:
    a img {border:none;}
    The first option goes back to the old, deprecated code; and
    it needs to
    be done on every image affected by the blue border. The
    second option is
    cleaner, and is automatically applied to every image inside a
    link in
    your site.
    David Powers, Adobe Community Expert
    Author, "The Essential Guide to Dreamweaver CS3" (friends of
    ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • Thin JFrame Border, Metal look and feel

    Hello,
    For an assignment of mine I am required to write a GUI that has thinner Window border then usual. The Frame of the window needs to be about half the size that it currently is. I'm looking to find the best way to do this. Is there a way to use the UI manager, or do I need a complete overhaul of the top-level container? Boy, I hope not!
    Thanks in advance!

    Note: This thread was originally posted in the [Java Programming|http://forums.sun.com/forum.jspa?forumID=31] forum, but moved to this forum for closer topic alignment.

  • A few questions regarding BorderLayout, JTabbedPane and JFrame.

    Hello,
    I'm after a little help. I want to know the following:
    1)
    How to you add a gap on the far left and far right so that the components at PAGE_START and PAGE_END when using BorderLayout have visible borders. I have tried the Constructor which lets you specific hGap and vGap but this does not work, I assume it is only when butting components together.
    2)
    When using JTabbedPanes with option
    setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT );is there a way to control painting of the Scroller which scrolls through the tabs? I am currently using a custom UI (subclassing BasicTabbedPaneUI) to paint my tabs however I can not work out how to paint the Scroller.
    3)
    How to I add a custom JFrame Border and remove the blue XP border? Do I need to setUndectored and add my own Icons? I want to achieve something along the lines of what you can see here
    https://substance.dev.java.net/images/screenshots/themes/skins/business1.png
    I will be using a custom L&F although not Substance and currently my L&F does not paint the border/Decorations on the Frame.
    Here is a picture of my app, outlining my problems.
    http://img91.imageshack.us/my.php?image=exampletz1.jpg
    A nudge in the right direction on any of these would be great.
    Thanks

    Hello,
    I'm after a little help. I want to know the
    following:
    1)
    How to you add a gap on the far left and far right so
    that the components at PAGE_START and PAGE_END when
    using BorderLayout have visible borders. I have
    tried the Constructor which lets you specific hGap
    and vGap but this does not work, I assume it is only
    when butting components together. agree vgap and hgap increase the vertical and horizontal distances between objects added to the panel that uses border layout.
    Why not do setBorder(BorderFactory.createEmptyBorder(.....) to do this for you?

  • Strange outline on overlaid images after render, but not before.

    Hey everyone! Thanks in advance!
    I am editing a music video, and I had to mask the brand name of the keyboard for copyright reasons. Basically I made a rectangle that matched the texture of the keyboard and overlaid it, keeping it aligned using motion keyframes.
    After completing the keyframes, I thumbed through each frame, and everything looked great, but I needed to render it. After rendering, it had this strange halo/border thing around it making it very obvious that I had tried to cover something up.
    The image is a .tiff with transparency. The video is DVCPro HD 1080 30P (Shot interlaced, 3:2 dropdown, de-interlaced) I have Final Cut version 7.0.3. The sequence is set to render in high-precision YUV.
    Here are some links to pre-render and post-render images. You can see part of the keyboard just sticking in from the right.
    http://www.gabrielredding.com/prerender.jpg
    http://www.gabrielredding.com/postrender.jpg
    Thanks a bunch guys!

    garbage matte a portion of the keyboard without the logo, move it into the right position and place it on top of the video, soften the edges with matte magic

  • Is anyone else having table border rendering problems in Firefox 3.6.7 for Mac?

    I recently applied a Mac Firefox update (not sure which one, but I'm currently on 3.6.7) that introduced some strange table border rendering behaviors. Long story short, on certain pages that I visit regularly, the right-most table borders are now rendering erratically. The problem does not occur in Safari or Chrome on Mac, nor does it occur in IE or Firefox on Windows. Seems specific to Mac Firefox.
    To reproduce, using Firefox 3.6.7 on Mac, browse to the following URL:
    http://www.relativityreport.com/?page_id=963
    ...and note the erratic rendering of the right-most table cells on the page (you may need to scroll down to the bottom-most table to see the problem...but not always). They should be gray, but often appear blank (not necessarily all at once). Refresh the page a few times and note how the missing borders randomly appear and disappear. Now click your browser's back button. When the previous page has loaded, click the forward button to return to the affected URL. Note now how all cells render correctly.
    Thanks!

    I am also getting a similar error. When I increase the border width to 2px or more it becomes sort of eroded.I am using windows 7 firefox 4. Borders seem fine in all other major browsers including IE9.
    [http://year3.masterspokerleague.com/index.php?option=com_poker&view=overall&season_id=2 Example] http://year3.masterspokerleague.com/index.php?option=com_poker&view=overall&season_id=2
    Any ideas?

  • Hiding the Frame Border

    Hi group,
    You know when you start up Mozilla you get a little picture which flashes up breathing fire? I wanna make a frame do that! I've got it so it flashes up a picture for 3 seconds and disposes of itself. From the main application it is run as a thread. I run it by calling
    new showflash().
    Here is the code ...
    import java.awt.*;
    import javax.swing.*;
    import java.awt.geom.*;
    public class Flashpan extends JPanel {
    private ImageIcon m_icon;
    public Flashpan () {
    JFrame frame = new JFrame("Border Title Bar");
    frame.setSize(669, 525);
    Container content = frame.getContentPane();
    content.add(this);
    m_icon = new ImageIcon("image.jpg");
    /*flash the window*/
    frame.setVisible(true);
    /* 3 second delay */
    try {
    Thread.sleep(3000);
    } catch (InterruptedException e) {
    /*kill the window*/
    frame.setVisible(false);
    frame.dispose();
    public void paintComponent(Graphics g) {
    super.paintComponent(g);
    Graphics2D g2d = (Graphics2D) g;
    m_icon.paintIcon(this, g2d, 10, 10);
    public static void showflash() {
    new Flashpan();
    Now the question is How do I make the window borders disappear. I have only one object contained in the frame, the picture. I want everything to disappear without killing it except this picture object? How do I do it? Im sure many people must have done this!! Maybe my code sucks.. pls forgive me :P
    Ive been looking at Inset() BorderLayout() etc.. etc.. but cant seem to work it out or find an example. I thought maybe it was frame.Inset(0,0,0,0) but I was wrong.

    Bingo, Ta for that....
    Complete code is as follows (screen centers now)
    import java.awt.*;
    import javax.swing.*;
    import java.awt.geom.*;
    public class Flashpan extends JPanel {
    private ImageIcon m_icon;
    public Flashpan () {
    JWindow frame = new JWindow();
    frame.setSize(640, 480);
    /* Get the size of the screen */
    Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
    /* Determine the new location of the window */
    int w = frame.getSize().width;
    int h = frame.getSize().height;
    int x = (dim.width - w) / 2;
    int y = (dim.height - h) / 2;
    /* Move the window */
    frame.setLocation(x, y);
    Container content = frame.getContentPane();
    content.add(this);
    m_icon = new ImageIcon("image.jpg");
    /*flash the window*/
    frame.setVisible(true);
    /* 3 second delay */
    try {
    Thread.sleep(3000);
    } catch (InterruptedException e) {
    /*kill the window*/
    frame.setVisible(false);
    frame.dispose();
    public void paintComponent(Graphics g) {
    super.paintComponent(g);
    Graphics2D g2d = (Graphics2D) g;
    m_icon.paintIcon(this, g2d, 0, 0);
    public static void showflash() {
    new Flashpan();
    greg

  • Using mouselistener and class extending jbutton

    Hello,
    I wondered if anyone could advice, I am trying wrote a class which lowers the border of a jbutton when the button is clicked, and stays lowered until clicked again. In the sameway as bold does in ms word.
    I understand I can use setBorder(raised) or setBorder(lowered).
    But I was unsure which method here to place this code.
    Thank you
    public class AddButton extends JButton implements MouseListener{
    protected Border raised = new SoftBevelBorder(BevelBorder.RAISED);
         protected Border lowered = new SoftBevelBorder(BevelBorder.LOWERED);
    public void mouseClicked(MouseEvent e) { }
    public void mouseMoved(MouseEvent e) { }
    public void mouseExited(MouseEvent e) { }
    public void mouseReleased(MouseEvent e) { }
    public void mouseEntered(MouseEvent e) { }
    public void mousePressed(MouseEvent e) { }
    public void mouseDragged(MouseEvent e) { }
    }

    import java.awt.*;
    import javax.swing.border.Border;
    import java.awt.event.*;
    import javax.swing.*;
    public class Test3 extends JFrame {
      Border rb = BorderFactory.createRaisedBevelBorder(),
             lb = BorderFactory.createLoweredBevelBorder();
      JButton jb1 = new JButton("I am Button"), jb2 = new JButton("Hear me roar");
      public Test3() {
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        Container content = getContentPane();
        content.setLayout(new FlowLayout());
        jb1.setBorder(rb);
        content.add(jb1);
        jb1.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent ae) {
            jb1.setBorder(jb1.getBorder()==rb?lb:rb);
        jb2.setBorder(rb);
        content.add(jb2);
        jb2.addMouseListener(new MouseAdapter() {
          public void mouseReleased(MouseEvent me) {
            jb2.setBorder(jb2.getBorder()==rb?lb:rb);
        JToggleButton jtb = new JToggleButton("Toggley Button");
        content.add(jtb);
        setSize(300,300);
        setVisible(true);
      public static void main(String[] arghs) { new Test3(); }
    }

  • Identifier Error

    I'm new to the forum. My problem is when I try passing a boolean value from one .java file to another. In my case the boolean value comes from a check box located in a JMenu and being passed to a draw checkerboard applet. The value being passed (selected) is located in the following code:
    public void itemStateChanged(ItemEvent e)
    JCheckBoxMenuItem uniform = (JCheckBoxMenuItem)(e.getSource());
    boolean selected = (e.getStateChange() == ItemEvent.SELECTED);
    CheckerBoard(selected);
    and trying to be passed into the following code:
    public class CheckerBoard extends JFrame
         Border line_border;
         TitledBorder slider_borderW, slider_borderH;
         JSlider sliderW,sliderH, box_slider;
         JButton colorButtonOne,colorButtonTwo;
         Color colorOne = new Color(12,2,34), newColorOne, oldColorOne;
         Color colorTwo = new Color(39,4,25), newColorTwo, oldColorTwo;
         Container c;
         String title;
         Font font;
         int numW, numH;
         int w = getWidth(), h = getHeight(), offset = 1;
         boolean slider_changedW = false;
         boolean slider_changedH = false;
         JCheckBox checkBox = new JCheckBox("Uniform");
         boolean selected = false;
         boolean uniform = selected;
         public CheckerBoard(selected)
              c = getContentPane();
              c.setLayout(new FlowLayout());
    I'm not sure if I am passing it right. Any help would be appreciated.
    CollegeGuy101

    I'm new to the forum. My problem is when I try
    passing a boolean value from one .java file to
    another. In my case the boolean value comes from a
    check box located in a JMenu and being passed to a
    draw checkerboard applet. The value being passed
    (selected) is located in the following code:
    public void itemStateChanged(ItemEvent e)
    JCheckBoxMenuItem uniform =
    rm = (JCheckBoxMenuItem)(e.getSource());
    boolean selected = (e.getStateChange() ==
    ) == ItemEvent.SELECTED);
    CheckerBoard(selected);
    }You try to call the constructor of the CheckerBoard class. The constructor is only called if you want to create a new instance of this class, not to pass parameters to an existing object (which is what you wanted to do I presume).
    I think you have to create a new method in the CheckerBoard class like doSelect(boolean selected) to react to this event.

  • Inserting widget phatfusion imagemenu

    I'm pretty new to dreamweaver but have inserted a few simple widgets on my webpage with no problems.
    I am now trying to insert "phatfusions imagemenu" http://www.phatfusion.net/
    I would like to have my own pictures with menu titles but I can't even get the images that the widget comes with to appear.  I'm not sure what I am doing wrong.  I have uploaded the entire file with the images, css files, ect but still it is not working.
    Can anyone think of what I may be doing wrong.  I have inserted widgets in the past but can't seem to get this one to work which is too bad because I think it looks great.
    Thanks for your help!

    Hi there,
    Thank you both for your speedy responses!  I made sure everything is validated, but I still get this strange white border in Safari as if it wants to put scroll bars on the right side and bottom of the page.  FF goes ahead and puts scroll bars in.  The other strange thing is that when I try to put pictures (totally unconnected with the widget) on the page the widget disappears.  Any help this time will also be greatly appreciated!  Thank you so much!
    Cheers,
    A.B.

  • JButton question, with clarification

    here is what i want for my JButton:
    | 1 |
    and here is what is happening:
    | ... |
    the reason I think what is happeneing is happening is because the size of the button is too small, so it is not displaying the "1" inside it.
    the trivial solution of increase the size of the button to allow the label to display is useless for me. I need the size to be 32x32 pixels.
    how do i FORCE the label to display. i have tried messing with the fonts, with the layout, everything.
    plz help.
    thnx.

    All you need to do is set the border to a minimal size, i.e.
         Dimension d = new Dimension (size, size);
              but.setPreferredSize (d);
              // but.setSize (size, size);
              Insets i = new Insets (1,1,1,1);
              but.setMargin (i);
    Here is my whole test program:
    import java.awt.*;
    import javax.swing.*;
    public class ButtonTest extends JPanel {
    JButton but = new JButton ("1");
    public ButtonTest (int size) {
         Dimension d = new Dimension (size, size);
              but.setPreferredSize (d);
              // but.setSize (size, size);
              Insets i = new Insets (1,1,1,1);
              but.setMargin (i);
    add (but);
    public void printSize () {
         Dimension d = but.getSize();
         System.out.println ("width = " +
                                  d.width + " height = " + d.height);
    public static void main (String [] args) {
    JFrame frame = new JFrame ("Border Test");
    Integer s = new Integer (args[0]);
    ButtonTest ats = new ButtonTest(s.intValue());
    frame.getContentPane().add("Center", ats);
    frame.pack();
    //frame.setSize (100, 100);
    frame.setVisible (true);
    ats.printSize();

Maybe you are looking for

  • How call native method without code modification

    "How to access third party's C API from Java Using JNI without modifying the C code"

  • Upgrade from Adobe Acrobat 5

    I am currently running Adobe Acrobat 5.  What is the current version and can I simply buy an upgrade

  • Safari 7.1 seed 1 why have I received this update?

    My Macbook pro has just downloaded and installed a Safari 7.1 seed 1 developer preview. Why is this? when it is not a stable form i.e beta or developer status

  • Variable issues in query

    Hi, I have a query in which one customer exit variable is used in the selection screen to  fill a variable automatically.Now i have removed that field (also variable ) from the query and saved it .But when  i run my query now am stil getting that fie

  • Reformatting of ASN from release 4.0 to 3.0D

    Hi All, I work on SAP ECC 5.0 which uses Release 4.0 version of ASN. it must be reformatted into release 3.0D in the source system by a sample program before interfacing into the ASN 3.0D layout in another SAP system. How do i achieve this? Regards N