Wie kan mij helpen?
Ik maak gebruik het skintooltje van l2fprod (www.l2fprod.com)
Ik een paneel met daaop een JDesktopPane. De JDesktopPane bevat een JinternalFrame.
Een JScrollPane bevat weer de JDesktoppane.
Het probleem: het JinternalFrame is groter dan het paneel (en dus ook groter dan de JdesktopPane. Maar naar het uitvoeren van mijn programma, (is het onderste dus niet zichtbaar), werken de scrollbars van het JScrollPane niet. Ik kan dus niet naar beneden scrollen.
Het kan een 'bug' zijn van l2fprod, daar heb ik al een maitlje heengestuurd, zonder antwoord...
Ik heb de code er maar bijgeplakt, ik heb al vanalles geprobeerd, tevergeefs helaas....
------------------------------ CODE --------------------------
import com.l2fprod.gui.*;
import com.l2fprod.gui.plaf.skin.*;
import com.l2fprod.util.*;
public class StudIPanel extends JPanel
public StudIPanel( )
{
frame2 = new JInternalFrame( "Test", false, false, false, false );
JDesktopPane desk = new JDesktopPane();
desk.putClientProperty("JDesktopPane.backgroundEnabled",Boolean.TRUE);
desk.putClientProperty("JDesktopPane.dragMode", "faster");
layout = new GridBagLayout();
frame2.getContentPane().setLayout(layout);
frame2.setSize( 450,850 );
frame2.setLocation( 50,50 );
frame2.setVisible(true);
constraints = new GridBagConstraints();
constraints.insets = new Insets( 2, 10, 2, 10 );
// Input voornaam
voornaamLabel = new JLabel("Voornaam:");
voornaamLabel.setFont ( new Font ( fontName, Font.BOLD,
fontSize ) );
LayoutTools.addComponent( voornaamLabel, constraints, layout,
frame2, voornaamRow, 0, 1, 1, 0.0f, constraints.BOTH,
constraints.CENTER );
// Buttons
okButton = new JButton ( "OK" );
okButton.setFont ( new Font ( fontName, Font.BOLD, fontSize ) );
okButton.addActionListener( handler );
LayoutTools.addComponent( okButton, constraints, layout, frame2, 2,
1, 1, 1, 1.0f, constraints.NONE, constraints.EAST );
cancelButton = new JButton ( "Annuleren" );
cancelButton.setFont ( new Font ( fontName, Font.BOLD, fontSize ) );
cancelButton.addActionListener( handler );
LayoutTools.addComponent( cancelButton, constraints, layout, frame2,
2, 2, 1, 1, 1.0f, constraints.NONE, constraints.WEST );
desk.add( frame2 );
setLayout(new BorderLayout());
JScrollPane scroller = new JScrollPane( desk );
scroller.setPreferredSize( new Dimension( 200,200 ) );
scroller.setVerticalScrollBarPolicy(
JScrollPane.VERTICAL_SCROLLBAR_ALWAYS );
scroller.setHorizontalScrollBarPolicy(
JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS );
scroller.setViewportBorder(BorderFactory.createLineBorder
(Color.black));
add( "Center", scroller );
}
Ik maak gebruik het skintooltje van l2fprod (www.l2fprod.com)
Ik een paneel met daaop een JDesktopPane. De JDesktopPane bevat een JinternalFrame.
Een JScrollPane bevat weer de JDesktoppane.
Het probleem: het JinternalFrame is groter dan het paneel (en dus ook groter dan de JdesktopPane. Maar naar het uitvoeren van mijn programma, (is het onderste dus niet zichtbaar), werken de scrollbars van het JScrollPane niet. Ik kan dus niet naar beneden scrollen.
Het kan een 'bug' zijn van l2fprod, daar heb ik al een maitlje heengestuurd, zonder antwoord...
Ik heb de code er maar bijgeplakt, ik heb al vanalles geprobeerd, tevergeefs helaas....
------------------------------ CODE --------------------------
import com.l2fprod.gui.*;
import com.l2fprod.gui.plaf.skin.*;
import com.l2fprod.util.*;
public class StudIPanel extends JPanel
public StudIPanel( )
{
frame2 = new JInternalFrame( "Test", false, false, false, false );
JDesktopPane desk = new JDesktopPane();
desk.putClientProperty("JDesktopPane.backgroundEnabled",Boolean.TRUE);
desk.putClientProperty("JDesktopPane.dragMode", "faster");
layout = new GridBagLayout();
frame2.getContentPane().setLayout(layout);
frame2.setSize( 450,850 );
frame2.setLocation( 50,50 );
frame2.setVisible(true);
constraints = new GridBagConstraints();
constraints.insets = new Insets( 2, 10, 2, 10 );
// Input voornaam
voornaamLabel = new JLabel("Voornaam:");
voornaamLabel.setFont ( new Font ( fontName, Font.BOLD,
fontSize ) );
LayoutTools.addComponent( voornaamLabel, constraints, layout,
frame2, voornaamRow, 0, 1, 1, 0.0f, constraints.BOTH,
constraints.CENTER );
// Buttons
okButton = new JButton ( "OK" );
okButton.setFont ( new Font ( fontName, Font.BOLD, fontSize ) );
okButton.addActionListener( handler );
LayoutTools.addComponent( okButton, constraints, layout, frame2, 2,
1, 1, 1, 1.0f, constraints.NONE, constraints.EAST );
cancelButton = new JButton ( "Annuleren" );
cancelButton.setFont ( new Font ( fontName, Font.BOLD, fontSize ) );
cancelButton.addActionListener( handler );
LayoutTools.addComponent( cancelButton, constraints, layout, frame2,
2, 2, 1, 1, 1.0f, constraints.NONE, constraints.WEST );
desk.add( frame2 );
setLayout(new BorderLayout());
JScrollPane scroller = new JScrollPane( desk );
scroller.setPreferredSize( new Dimension( 200,200 ) );
scroller.setVerticalScrollBarPolicy(
JScrollPane.VERTICAL_SCROLLBAR_ALWAYS );
scroller.setHorizontalScrollBarPolicy(
JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS );
scroller.setViewportBorder(BorderFactory.createLineBorder
(Color.black));
add( "Center", scroller );
}