Results 1 to 3 of 3

Thread: Insert a GLAnimCanvas in a JScrollPane Swing

  1. #1
    Member Contributor
    Join Date
    Apr 2002
    Posts
    52

    Insert a GLAnimCanvas in a JScrollPane Swing

    Hi !

    I create a GUI for a scientific program. I have a GLAnimCanvas class in which I draw a pipe.. My GUI is in Swing. I arrive to display my GLAnimCanvas in a JScrollPane but no correctly... The entire size of the GLAnimCanvas is always visible. I have a vertical scroll but when I move it, it recovers the rest of the GUI:

    ---------------------
    Menu
    ---------------------
    OpenGL GLAnimCanvas
    ---------------------
    status bar
    ---------------------

    the GLAnimCanvas will recover the menu and the status bar inspite of being hide by them...

    I hope my explication is clear enough..
    How could I do for having a correct crollbar ?

    Thanks in advance for your help
    Mat

  2. #2
    Junior Member Newbie
    Join Date
    Apr 2002
    Posts
    28

    Re: Insert a GLAnimCanvas in a JScrollPane Swing

    Hi Mat,
    I think this is really a java question. You are using a GLAnimCanvas, which is a heavyweight component (it extends Canvas), in a swing container which is lightweight. If you use the swing classes (e.g. GLAnimJPanel) provided in GL4Java it will probably fix your problem.

    Jimmi

  3. #3
    Member Contributor
    Join Date
    Apr 2002
    Posts
    52

    Re: Insert a GLAnimCanvas in a JScrollPane Swing

    Hi jimmi and thanks for your reply...

    in fact I tried with a JPanel and it did not work to, but it worked if I put my GLanimCanvas in an AWT scrollPane and not swing !

    Mat


    Originally posted by jimmi:
    Hi Mat,
    I think this is really a java question. You are using a GLAnimCanvas, which is a heavyweight component (it extends Canvas), in a swing container which is lightweight. If you use the swing classes (e.g. GLAnimJPanel) provided in GL4Java it will probably fix your problem.

    Jimmi


Similar Threads

  1. To swing a swing
    By savita in forum OpenGL: Basic Coding
    Replies: 12
    Last Post: 05-08-2011, 01:45 PM
  2. OpenGL & Swing hw / lw issues - help
    By Jeffg in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 04-04-2011, 01:18 PM
  3. Making a swing in 3d
    By hoganh in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 11-25-2003, 05:53 AM
  4. GlAnimCanvas & JMenu
    By els in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 10-16-2003, 06:43 AM
  5. Resize GLAnimCanvas in Java
    By Mat in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 06-21-2002, 01:19 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean