我想将jcomponent分成不同的部分
public TaskGraphComponent(ProjectFrame proFrame,TaskGraphModel model,TaskGraphPainter painter) {
this.proFrame = proFrame;
_painter = painter;
setLayout(new BorderLayout());
setModel(model);
_mouseHandler = new GraphMouseHandler(this);
_verticalScroll1 = new JScrollBar(JScrollBar.VERTICAL);
this.add(_verticalScroll1, BorderLayout.EAST);
_verticalScroll1.addAdjustmentListener(this);
_verticalScroll1.setVisible(true);
setBorder(BorderFactory.createEmptyBorder(0,0,15,0));
this.addMouseMotionListener(_mouseHandler);
this.addMouseListener(_mouseHandler);
this.addMouseWheelListener(_mouseHandler);
this.addKeyListener(_mouseHandler);
this.addComponentListener(this);
this.setFocusable(false);
this.setSize(10, 50);
ToolTipManager.sharedInstance().setDismissDelay(8000);
ToolTipManager.sharedInstance().setReshowDelay(3000);
}
这里的TaskGraphComponent是jcomponent,我可以垂直制作不同的部分 TaskGraphComponent是jcomponent使用Borderlayout.TaskgraphComponent wil show big 屏幕。实际上任务是我想将这个taskGraphComponent溢出到部分