Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void AddObject(String type /* Available types: IMG and TXT */, int windowID /* get which window this object has to be added to */, Dimension position /* locate where we should place our object */, String txt /* text */) {
- JFrame frame = (JFrame) JFrame.getFrames()[windowID];
- JLabel emptyLabel = new JLabel(txt);
- emptyLabel.setPreferredSize(position);
- frame.getContentPane().add(emptyLabel, BorderLayout.CENTER);
- frame.pack();
- System.out.println("[JGL2D] Success in the making of an " + type + " object");
- }
Add Comment
Please, Sign In to add comment