package GUI;
import javax.swing.BoxLayout;
import javax.swing.JButton;
import javax.swing.JEditorPane;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.JTextPane;
import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;
import java.io.File;
import java.io.FileFilter;
/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit [url]www.cloudgarden.com[/url] for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class NewJFrame extends javax.swing.JFrame {
{
//Set Look & Feel
try {
javax.swing.UIManager.setLookAndFeel("com.jgoodies.looks.plastic.Plastic3DLookAndFeel");
} catch(Exception e) {
e.printStackTrace();
}
}
private JButton jButton1;
/**
* Auto-generated main method to display this JFrame
*/
public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
NewJFrame inst = new NewJFrame();
inst.setLocationRelativeTo(null);
inst.setVisible(true);
}
});
}
public NewJFrame() {
super();
initGUI();
}
private void initGUI() {
try {
File verzeichnis = new File("O:/Fax_Archiv/Fax_Ausgang_pfd"); // Hier muss natürlich dann dein Pfad angegeben werden
if (verzeichnis.exists()) {
int iAnzahlPDF = verzeichnis.listFiles(new FileFilter() {
public boolean accept(File pathname) {
return pathname.getName().matches(".+\\.(?i)pdf");
}
}).length;
// System.out.println(iAnzahlPDF);
{
jButton1 = new JButton();
getContentPane().add(jButton1);
jButton1.setText(String.valueOf(iAnzahlPDF + " Neue FAXE"));
jButton1.setBounds(0, 139, 104, 21);
}
}
getContentPane().setLayout(null);
setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
pack();
this.setSize(112, 187);
} catch (Exception e) {
e.printStackTrace();
}
}
}