biskuteri-cafe-JKomasto2/PostWindow.java

41 lines
723 B
Java
Raw Normal View History

2021-07-16 00:37:03 +02:00
import javax.swing.JFrame;
import javax.swing.JMenuBar;
import javax.swing.JMenu;
import java.awt.Dimension;
class
PostWindow extends JFrame {
private PostComponent
posts;
private RepliesComponent
replies;
// ---%-@-%---
// ---%-@-%---
PostWindow()
{
setLocationByPlatform(true);
posts = new PostComponent();
replies = new RepliesComponent();
JMenu postMenu = new JMenu("Post");
postMenu.add("Favourite");
postMenu.add("Reply");
postMenu.add("Show replies");
JMenuBar menuBar = new JMenuBar();
menuBar.add(postMenu);
setJMenuBar(menuBar);
setContentPane(posts);
setSize(360, 270);
}
}