Pageable是一个接口而以。

解决方案 »

  1.   

    我要做一个报表预览的类,这个类的构造函数有一个参数Pageable,那么我如何得到这样的一个Pageable传给它呢?qiyao请帮帮忙,否则我明天就要被抄掉了:(
      

  2.   

    预览类构造函数是这样的:
    public PrintPreviewer(Pageable p,int page)我上传程序都上传不了。请耐心帮帮我!真的急得不得了!!!
      

  3.   

    预览类的构造函数是这样的:
    public PrintPreviewer(Pageable p,int page){
         pageable=p;
     pageIndex=page;
     printComponent=new PrintComponent(null,null);
     printComponent.setBorder(BorderFactory.createBevelBorder(
        BevelBorder.RAISED));
     buildLayout();
     displayPage(pageIndex);
       }
       
       protected void buildLayout(){
          setLayout(new BorderLayout());
      JPanel panel=new JPanel();
      panel.setLayout(new FlowLayout(FlowLayout.CENTER,10,10));
      panel.add(printComponent);
      scrollPane=new JScrollPane(panel);
      add(scrollPane,BorderLayout.CENTER);
      add(getBottomPanel(),BorderLayout.SOUTH);
      addListeners();
      }