简体   繁体   English

具有固定标题的可滚动内容,无需使用JTable

[英]Scrollable Content with fixed header without using the JTable

I want to fix the header of my content so it does not scroll down with the content. 我想修复内容的标题,以便它不会随内容向下滚动。 Is it possible to do it with a, and if yes, could you please shed some light as to how I can go about implementing it without using a JTable. 是否可以使用a做,如果可以的话,能否请您阐明我如何不使用JTable来实现它。

JScrollPane has JScrollPane

public void setRowHeader(JViewport rowHeader)

See eg http://www.java2s.com/Code/Java/Swing-JFC/Scrollpaneruler.htm 参见例如http://www.java2s.com/Code/Java/Swing-JFC/Scrollpaneruler.htm

  • JTable in the JScrollPane has TableHeader fixed in Rectangle JScrollPane中的 JTable 在矩形中固定了TableHeader

  • there are three (standard)ways where isn't TableHeader fixed on some Point 在某些Point上没有固定TableHeader三种(标准)方式

    1. JTable in the JScrollPane is layed by som of LayoutManager (notice depends of type of LayoutManager or area ) into resiziable Container JScrollPane JTableLayoutManager的som(注意取决于LayoutManager的类型或area )放置到可调整的Container

    2. JTable in the JScrollPane could be draggable JScrollPane JTable可以拖动

    3. JTable has resizable ColumnModel JTable具有可调整大小的ColumnModel

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM