setting layout of container

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • star111792
    New Member
    • Jan 2007
    • 26

    #1

    setting layout of container

    hi

    i m writing java in notepad. it worked well but my problem is that i want to display my results on frame. i m importing the package "javax.swing.JF rame" for this purpose.
    im writing these 2 statements for container

    Container c=getContentPan e();
    c.setLayout(new XYLayout());

    but its not working. its giving an error that "return type is required" at the last statement. how can i overcome this problem???????

    thanks
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Originally posted by star111792
    hi

    i m writing java in notepad. it worked well but my problem is that i want to display my results on frame. i m importing the package "javax.swing.JF rame" for this purpose.
    im writing these 2 statements for container

    Container c=getContentPan e();
    c.setLayout(new XYLayout());

    but its not working. its giving an error that "return type is required" at the last statement. how can i overcome this problem???????

    thanks
    Please elaborate: what did the compiler *exactly* tell you?

    kind regards,

    Jos

    Comment

    Working...