Tag Archives: swing

SWT Browser in Swing JInternalFrame

Questions: I am trying to implement the swt Browser in a JInternalFrame. I found that example and tried it with the extended Canvas class from the example. If I build it in a JFrame, it runs with no problem. In a comment at the tops of the example is this standing: The browser component can… Read More »

Java Swing GUI in other classes

Questions: I’m currently working on my first Swing project in Java. I want to split my GUI into 3 seperate classes. My main class, TicTacToeGUI, and two others: MenuBar and Board. I have a problem with my menu. I can’t figure out how to make it visible. The code is compiling but the menu is… Read More »

JAVA Swing GUI in another classes

Questions: Im currently working on my first swing project in JAVA. I wanted to split my GUI to 3 seperate classes. My main class: TicTacToeGUI and two others: – MenuBar – Board I have a problem with my menu. I cant figure out how to make it visible. The code is compiling. But the menu… Read More »

How to create layout with Swing?

Questions: I want to design like frame using four panel, taking into account zoom in and out the screen… Like this design: JPanel testPanel = new JPanel(); testPanel.setBorder(BorderFactory.createLineBorder(Color.black)); frame.add(testPanel, BorderLayout.NORTH); JPanel testPanel1 = new JPanel(); testPanel1.setBorder(BorderFactory.createLineBorder(Color.black)); frame.add(testPanel1, BorderLayout.NORTH); JPanel testPane2 = new JPanel(); testPane2.setBorder(BorderFactory.createLineBorder(Color.black)); frame.add(testPane2, BorderLayout.EAST); JPanel testPane3 = new JPanel(); testPane3.setBorder(BorderFactory.createLineBorder(Color.black)); frame.add(testPane3, BorderLayout.CENTER); Answers: