Added JFrames. Fixed not-working queries.