Friends!
I want to create a simple schedule event calendar like this one

Question: What can i use in Swing/AWT hiearchy in order to have such flexible grid.
P.S I was trying to do some solution in JTable direction with Custom CellRenderers but it was ugly. Maybe it can be something like JPanel-in-JPanel solution? What do you think?
This is not a simple solution and you have any number of options…
Because the content can expand over multiple rows,
JTableisn’t really a viable solution (there’s probably any number of ways to do it, but each will become more complicated over time…and any solution I’ve seen doesn’t take into account the current Look and Feel).But if you’re interested, you could take a look at
You other choice would be to create a custom component capable of rendering the data model.
I, personally, would focus on an individual column, allowing it to be it’s panel. With a custom layout manager, you could layout additional components based on the requirements of the data model.
Once you have that figured out, you would be able to expand the concept to allow for multiple rows.
This allows you greater flexibility in how the individual components are laid out and rendered, but is quite complex.
I would take a look at How to use Scroll Panes so you can see how row and column headers work 😉