title: How do java Imports work (swing)?
body: <p>So I tried to create an empty border and was required to import javax.swing.border.EmptyBorder;</p>
  
  <p>However I had already imported javax.swing.*;</p>
  
  <p>How come I was required to import the prior import? Doesn't the .* import everything from the swing package.</p>
  
  <p>My source code is listed below:        </p>
  
  <pre><code>   import javax.swing.*;
     import javax.swing.border.EmptyBorder;
  
     import java.awt.*;
    /*
  public class Gui extends JFrame {
  
  //row1
  JPanel row1 = new JPanel();
  JButton reset = new JButton("Reset");
  JButton play = new JButton("Play");
  
  //row2
  JPanel row2 = new JPanel();
  JLabel option = new JLabel("Guess: ", JLabel.RIGHT);
  JTextField text1 = new JTextField("0");
  JTextField text2 = new JTextField("0");
  JTextField text3 = new JTextField("0");
  
  //row3
  JPanel row3 = new JPanel();
  JLabel answerL = new JLabel("Answer: ", JLabel.RIGHT);
  JTextField answerB = new JTextField("", 0);
  */
  public Gui(){
  /*  super("Guess My Number");
      setSize(500, 800);
      GridLayout masterLayout = new GridLayout(4, 1);
      setLayout(masterLayout);
  
  
      FlowLayout layout1 = new FlowLayout(FlowLayout.LEFT);
      row1.setLayout(layout1);
      row1.add(reset);
      row1.add(play);
      add(row1);
  
  
      GridLayout layout2 = new GridLayout(1, 4, 30, 30);
      row2.setLayout(layout2);*/
      row2.setBorder(new EmptyBorder(0,100,0,200));
      /*row2.add(option);
      row2.add(text1);
      row2.add(text2);
      row2.add(text3);
      add(row2);
  
      GridLayout layout3 = new GridLayout(1,1, 10, 10);
      row3.setLayout(layout3);
      row3.add(answerL);
      row3.add(answerB);
      add(row3);
  
  
      setVisible(true);
  }
  
  public static void main(String[] args){
      Gui game = new Gui();
  }
  }
   */
  </code></pre>