Swing is an extremely powerful toolkit with very rich capabilities. And since it's backed by Java2D, you can control the painting of a widget at the pixel level, if you want to - which is something CSS won't have until the CSS Painting API arrives[1]. For proof, look at what JetBrains achieves in IntelliJ, which uses Swing.
Technical capabilities are not the obstacle. The problem is that you're trying to reverse engineer and build a faithful emulation of a complex set of software components in a completely different language and runtime. And unlike emulating a legacy system, OS toolkits are a moving target. They get tweaked constantly, and often overhauled completely with each new release.