Enterprise beans are written to operate inside of an
EJB container, so I don't think they could ever get access to the resources that Swing or AWT use. EJB's are not concerned about user interfaces.
Have a look at the "Model-View-Controller" design
pattern and at tiered architecture.
Not sure why you would want to mix the persistence layer with the presentation layers [if you could!]. I think if you designed a system with only one architectural tier, it would end in tears!