Bugzilla – Attachment 349 Details for
Bug 586
Bug with GLCanvas/jScrollPane when working with GLJPanel
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
Log In
[x]
|
Forgot Password
Login:
[x]
Test case
JScrollPaneExample.java (text/x-java), 1.35 KB, created by
Sylvestre Ledru
on 2012-06-04 15:03:51 CEST
(
hide
)
Description:
Test case
Filename:
MIME Type:
Creator:
Sylvestre Ledru
Created:
2012-06-04 15:03:51 CEST
Size:
1.35 KB
patch
obsolete
>import java.awt.BorderLayout; >import java.awt.Dimension; > >import javax.media.opengl.awt.GLCanvas; >import javax.media.opengl.awt.GLJPanel; >import java.awt.Component; >import javax.swing.JFrame; >import javax.swing.JPanel; >import javax.swing.JScrollPane; >import javax.swing.JTextArea; >import javax.swing.WindowConstants; > >public class JScrollPaneExample extends JFrame { > > public static void main(String[] arguments) { > new JScrollPaneExample(); > } > > /** The gl panel. */ > private final Component glComponent; > > private JScrollPaneExample() { > String disable = System.getProperty("GLJPanel"); > if (disable==null) { > glComponent = new GLCanvas(); > } else { > glComponent = new GLJPanel(); > } > > > glComponent.setPreferredSize(new Dimension(800, 600)); > > JPanel panel = new JPanel(new BorderLayout()); > JScrollPane scrollPane = new JScrollPane(glComponent); > JTextArea textArea = new JTextArea(); > textArea.setText("Test\nTest\nTest\nTest\n"); > > panel.add(scrollPane, BorderLayout.CENTER); > panel.add(textArea, BorderLayout.NORTH); > > add(panel); > setLocationRelativeTo(null); > setTitle("GLCanvas in JScrollPane example"); > setSize(600, 400); > setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); > setVisible(true); > } >} >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 586
: 349