Google 網路論壇不再支援新的 Usenet 貼文或訂閱項目,但過往內容仍可供查看。

Jtable and cells spanning columns - Newbie

瀏覽次數:1 次
跳到第一則未讀訊息

DanielC

未讀,
2002年11月6日 下午1:23:482002/11/6
收件者:
When searching the archives on this topic the response posted is to go to:
http://www2.gol.com/users/tame/swing/examples/JTableExamples1.html
Also readers are suggested to go to:
http://www.codeguru.com/java/articles/139.shtml

I don't see any documentation at these locations. They show you code.

If I look at the first routine, GroupableHeaderExample.java, it has:
import jp.gr.java_conf.tame.swing.table.*;

Am I suppose to figure out how to get code from this location? I doubt it, but
I thought I would ask.

Looks complicated. I suppose this isn't for beginners. I should probably learn
how to use a regular jtable first before trying to do fancy features. Would you
agree?

Thanks in advance, DanielC.


Linda Radecke

未讀,
2002年11月6日 下午2:00:252002/11/6
收件者:

DanielC wrote:
> When searching the archives on this topic the response posted is to go to:
> http://www2.gol.com/users/tame/swing/examples/JTableExamples1.html
> Also readers are suggested to go to:
> http://www.codeguru.com/java/articles/139.shtml

> I don't see any documentation at these locations. They show you code.
>
> If I look at the first routine, GroupableHeaderExample.java, it has:
> import jp.gr.java_conf.tame.swing.table.*;

> Am I suppose to figure out how to get code from this location? I doubt it, but
> I thought I would ask.

This refers to the package, but I think you can use these examples
just commenting the lines. I haven't tested one of these examples
myself, admittedly.

> Looks complicated. I suppose this isn't for beginners. I should probably learn
> how to use a regular jtable first before trying to do fancy features. Would you
> agree?

I'd always recommend first to learn the basic-stuff before going a
step further. Also, it depends on which functionality you really
need for yourself.


Hope this helps - Linda
--
* Ooh, yeah, you're amazing!* We think you're incredible.
You say we're fantastic, But still we don't head the bill.
Wow! Wow! Wow! Wow! Wow! Wow! Unbelievable! * ~ * ~ * ~ *
>::>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>:Kate Bush, Wow!

DanielC

未讀,
2002年11月6日 下午3:02:002002/11/6
收件者:
Linda,

Thanks for the tips. Just as an FYI: I tried to run the example and got the
below error message:
Exception in thread "main" java.lang.NullPointerException
at
GroupableTableHeaderUI.getHeaderHeight(GroupableTableHeaderUI.java:87)
at
GroupableTableHeaderUI.createHeaderSize(GroupableTableHeaderUI.java:108)
at
GroupableTableHeaderUI.getPreferredSize(GroupableTableHeaderUI.java:118)
at javax.swing.JComponent.getPreferredSize(JComponent.java:1272)
at
javax.swing.ViewportLayout.preferredLayoutSize(ViewportLayout.java:75)
at java.awt.Container.preferredSize(Container.java:1175)
at java.awt.Container.getPreferredSize(Container.java:1159)
at javax.swing.JComponent.getPreferredSize(JComponent.java:1274)
at
javax.swing.ScrollPaneLayout.layoutContainer(ScrollPaneLayout.java:702)
at java.awt.Container.layout(Container.java:1017)
at java.awt.Container.doLayout(Container.java:1007)
at java.awt.Container.validateTree(Container.java:1089)
at java.awt.Container.validateTree(Container.java:1096)
at java.awt.Container.validateTree(Container.java:1096)
at java.awt.Container.validateTree(Container.java:1096)
at java.awt.Container.validateTree(Container.java:1096)
at java.awt.Container.validate(Container.java:1064)
at java.awt.Window.show(Window.java:450)
at java.awt.Component.show(Component.java:1134)
at java.awt.Component.setVisible(Component.java:1089)
at GroupableHeaderExample.main(GroupableHeaderExample.java:66)

Probably caused by incompatibilites in the different java versions. I believe
the example code is from 1998.

DanielC.

"Linda Radecke" <li...@jalice.ch> wrote in message
news:3DC966C9...@jalice.ch...

0 則新訊息