• Post Reply Bookmark Topic Watch Topic
  • New Topic

BorderLayout Problem

 
Niyas Ahmed Sheikh
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Error Message:
SimpleGUI11.java:18: cannot resolve symbol
symbol : variable BorderLayout
location: class SimpleGUI11
f.getContentPane().add(BorderLayout.EAST, panel);
^
1 error


What is problem with this line: f.getContentPane().add(BorderLayout.EAST, panel);
 
prithvi s zankat
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Sheikh,
There is no problem in your code. You have missed only the <import java.awt.*> statement. Here you have used BorderLayout class in <f.getContentPane().add(BorderLayout.EAST,panel);> statement.BorderLayout class is defined in <java.awt> package.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!