Search in sources :

Example 1 with ActionCheckIP

use of com.jsql.view.swing.action.ActionCheckIP in project jsql-injection by ron190.

the class PanelPreferences method initializePanelProxy.

private void initializePanelProxy() {
    panelProxy.setLayout(new BoxLayout(panelProxy, BoxLayout.Y_AXIS));
    panelProxy.setBorder(this.panelBorder);
    final var buttonCheckIp = new JButton("Check your IP");
    buttonCheckIp.addActionListener(new ActionCheckIP());
    buttonCheckIp.setToolTipText("<html><b>Verify what public IP address is used by jSQL</b><br>" + "Usually it's your own public IP if you don't use a proxy. If you use a proxy<br>" + "like TOR then your public IP is hidden and another one is used instead.</html>");
    buttonCheckIp.setContentAreaFilled(true);
    buttonCheckIp.setBorder(UiUtil.BORDER_ROUND_BLU);
    var flatButtonMouseAdapter = new FlatButtonMouseAdapter(buttonCheckIp);
    flatButtonMouseAdapter.setContentVisible(true);
    buttonCheckIp.addMouseListener(flatButtonMouseAdapter);
    var labelProxy = new JLabel("<html><b>Proxy</b> / Settings for tools like Burp and Tor</html>");
    panelProxy.removeAll();
    panelProxy.add(labelProxy, BorderLayout.NORTH);
    panelProxy.add(this.panelProxyPreferences);
    var panelCheckIp = new JPanel(new FlowLayout(FlowLayout.LEADING, 0, 0));
    panelCheckIp.setBorder(BorderFactory.createEmptyBorder(15, 0, 0, 0));
    panelCheckIp.add(buttonCheckIp);
    panelCheckIp.add(Box.createGlue());
    panelProxy.add(panelCheckIp);
    labelProxy.setAlignmentX(Component.LEFT_ALIGNMENT);
    this.panelProxyPreferences.setAlignmentX(Component.LEFT_ALIGNMENT);
    panelCheckIp.setAlignmentX(Component.LEFT_ALIGNMENT);
}
Also used : JPanel(javax.swing.JPanel) FlowLayout(java.awt.FlowLayout) ActionCheckIP(com.jsql.view.swing.action.ActionCheckIP) BoxLayout(javax.swing.BoxLayout) JButton(javax.swing.JButton) FlatButtonMouseAdapter(com.jsql.view.swing.ui.FlatButtonMouseAdapter) JLabel(javax.swing.JLabel)

Aggregations

ActionCheckIP (com.jsql.view.swing.action.ActionCheckIP)1 FlatButtonMouseAdapter (com.jsql.view.swing.ui.FlatButtonMouseAdapter)1 FlowLayout (java.awt.FlowLayout)1 BoxLayout (javax.swing.BoxLayout)1 JButton (javax.swing.JButton)1 JLabel (javax.swing.JLabel)1 JPanel (javax.swing.JPanel)1