import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JComponent; import java.awt.Dimension; import java.awt.BorderLayout; class JKomasto { public static void main(String... args) { new JKomasto(); } // ---%-@-%--- public JKomasto() { new TimelineWindow().setVisible(true); //new ComposeWindow().setVisible(true); //new PostWindow().setVisible(true); } // - -%- - private static void test(JComponent component, int width, int height) { JFrame frame = new JFrame(); frame.setTitle(component.getClass().getName()); frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); frame.setLocationByPlatform(true); JPanel panel = new JPanel(); panel.setPreferredSize(new Dimension(width, height)); panel.add(component); frame.setContentPane(panel); frame.setVisible(true); } } enum PostVisibility { PUBLIC, LOCAL, FOLLOWERS, MENTIONED } enum TimelineType { FEDERATED, LOCAL, HOME, MENTIONS, MESSAGES, LIST } class Timeline { public TimelineType type; } class Post { public String text; public String authorId, authorName; public String date; public PostVisibility visibility; public String postId; public boolean boosted, favourited; } class Composition { public String text; public PostVisibility visibility; public String replyToPostId; }