There are several improvements that can be made, and I'm not sure any of them will solve your problem, because I can't duplicate it.
This one certainly won't: Give your variables better names! For example, why name the cancel button "objJButton2"??? Name the dang thing "cancelButton" or something that makes sense. The same with the rest of your variables!
Run your Swing applications on the EDT. An alarm should go off anytime you build and run a Swing app on the main thread or entirely in the main() method. This may actually be contributing to the error you're seeing, causing the components to blink every time the GUI is redrawn, but I'm not sure since I can't see it.
Finally, the last component being added to the JFrame is becoming the JFrame's background. I think this is because the default layout manager for the JFrame is BorderLayout, so the last component added is taking the BorderLayout.CENTER position. You can verify this by commenting out the last component being added (currently the cancel button) and observe what happens. Even using a simple layout manager like FlowLayout is preferred to what you've done, but since this is a probably a program to study how things work, playing around to see what happens is fine.
Here's your program modified to do everything I've described except changing the variable names - that's for you to do. Let me know if you still see the components coming in and out.
/* File: TechStudentFrame.java
* GregBrannon, August 2013, modified TechStudent's post:
public class TechStudentFrame
// the default constructor that builds the frame and sets it visible
// set the frame's basic characteristics
JFrame objJFrame = new JFrame("Login");
objJFrame.setResizable( false );
objJFrame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
objJFrame.setLayout( new FlowLayout() );
// build the components to be added to the frame
JButton objJButton1 = new JButton("Login");
JButton objJButton2 = new JButton("Cancel");
JTextField objJTextField1 = new JTextField(" ",10);
JTextField objJTextField2 = new JTextField(" ",10);
JLabel objJLabel1 = new JLabel();
JLabel objJLabel2 = new JLabel();
// add the components to the frame
// set the frame visible
objJFrame.setVisible( true );
// the main() method creates an instance of the frame on the EDT
// see this article for more info:
public static void main(String args)
SwingUtilities.invokeLater( new Runnable()
public void run()
} // end method main()
} // end class TechStudentFrame