Progressbar Icon
This commit is contained in:
parent
d8c4680e16
commit
ad5d7d98c4
@ -1,8 +1,15 @@
|
||||
package tourplaner.ui;
|
||||
|
||||
import javafx.scene.image.Image;
|
||||
import tourplaner.business.ConfigHelper;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.swing.*;
|
||||
import javax.swing.border.TitledBorder;
|
||||
import java.awt.*;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
public class ProgressBar {
|
||||
private int status;
|
||||
@ -11,6 +18,13 @@ public class ProgressBar {
|
||||
|
||||
public ProgressBar(String title){
|
||||
this.frame = new JFrame(title);
|
||||
File pathToFile = new File(ConfigHelper.getIniString(ConfigHelper.getStandartConfig(), "start", "logo"));
|
||||
try {
|
||||
BufferedImage image = ImageIO.read(pathToFile);
|
||||
this.frame.setIconImage(image);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
this.frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
|
||||
Container content = this.frame.getContentPane();
|
||||
this.progressBar = new JProgressBar();
|
||||
|
Loading…
x
Reference in New Issue
Block a user