You won't see a big difference either way; GUI applications are actually not CPU intensive. Or at least, the GUI part of them is not; they may or may not be doing other things that are. To qualify that a bit further, if the application involves image processing or rendering special types of graphical documents (.pdf
, etc.) to the screen, that's sort of an aspect of the GUI and that could be processor intensive. But most GUI applications don't do this.
In other words, if what you are doing is a standard control interface -- buttons, text entries, menus, scrolling lists, etc. etc. -- its GUI aspect does not require significant CPU resources and choosing swing over python here or vice versa will not make any difference to performance.
However, memory is a concern on the pi and GUI applications can use a lot of that. You might want to consider what other things you are most likely to be using at the same time. If those are java based, then java is a better choice because it will be loaded already; likewise with python. Note python has a much smaller footprint to start with.
Also, you are probably using a desktop with a lot of GTK in it, so anything which uses those libraries will save memory too. I believe java swing does not, it uses its own stuff. I am sure there is a python GTK lib, however (that will share memory with the native ones used by most applications) -- but Tk(inter) will be separate again (although relatively small I think).
Python and Java both have raspberry pi specific libraries for GPIO control -- although you don't actually have to use these, since the native sysfs GPIO interface (i.e. /sys/class/gpio
) is language agnostic and drop dead simple to begin with.