getField method for GUI