protected void initComponents() {
JPanel mainPanel = new JPanel();
mainPanel.setLayout(new BoxLayout(mainPanel,BoxLayout.Y_AXIS));
setContentPane(mainPanel);
OptionPanel dialogPanel = new OptionPanel(2);
JPanel buttonPanel = new JPanel();
buttonPanel.setLayout(new BoxLayout(buttonPanel,BoxLayout.X_AXIS));
mainPanel.add(dialogPanel);
mainPanel.add(buttonPanel);
/**
Input fields
**/
agentNameField = SwingHelper.createInputField(25);
dialogPanel.add("Agent name:",agentNameField);
startRefererField = SwingHelper.createInputField(25);
dialogPanel.add("Start referer:",startRefererField);
proxyField = SwingHelper.createInputField(25);
dialogPanel.add("Proxy (host:port or empty):",proxyField);
maxDepthField = SwingHelper.createInputField(5);
dialogPanel.add("Maximal search depth:",maxDepthField);
sleepField = SwingHelper.createInputField(5);
dialogPanel.add("Sleep time (in seconds)",sleepField);
bandwidthField = SwingHelper.createInputField(5);
dialogPanel.add("Bandwidth limit in Bytes/s (0 to disable)",
bandwidthField);
maxAgeField = SwingHelper.createInputField(5);
dialogPanel.add("Maximum age in days (leave empty to disable)",
maxAgeField);
cookiesEnabled = new JCheckBox();
dialogPanel.add("Enable cookies",cookiesEnabled);
allowWholeHost = new JCheckBox();
dialogPanel.add("Allow all URLs on start host",allowWholeHost);
allowWholeDomain = new JCheckBox();
dialogPanel.add("Allow all URLs in the same domain",allowWholeDomain);
flexibleHostCheck = new JCheckBox();
dialogPanel.add("Do flexible host checking",flexibleHostCheck);
ignoreRobotsTxt = new JCheckBox();
dialogPanel.add("Ignore robots.txt",ignoreRobotsTxt);
localizeLinks = new JCheckBox();
dialogPanel.add("Localize links",localizeLinks);
storeCGI = new JCheckBox();
dialogPanel.add("Save dynamic pages",storeCGI);
allowCaching = new JCheckBox();
dialogPanel.add("Don't retrieve pages that are already on disk "
+"(resume download)",
allowCaching);
/** End of input fields */