-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SQL driver code optimization Throw error message in a message dialog About project window Removed unfinished JDialog
- Loading branch information
1 parent
dfc4b98
commit ad597c3
Showing
13 changed files
with
183 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package GUI; | ||
|
||
import java.awt.*; | ||
import javax.swing.*; | ||
import java.awt.event.*; | ||
import java.net.URL; | ||
|
||
public class about extends JDialog { | ||
private static final long serialVersionUID = 5381052862136001506L; | ||
|
||
public about() { | ||
setModalityType(ModalityType.APPLICATION_MODAL); | ||
setResizable(false); | ||
setTitle("About Project"); | ||
setBackground(Color.WHITE); | ||
getContentPane().setBackground(Color.WHITE); | ||
Dimension dimension = Toolkit.getDefaultToolkit().getScreenSize(); | ||
int x = (int) ((dimension.getWidth() - getWidth()) / 2); | ||
int y = (int) ((dimension.getHeight() - getHeight()) / 2); | ||
setBounds(x, y, 516, 600); | ||
setLocationRelativeTo(null); | ||
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); | ||
setAlwaysOnTop(true); | ||
getContentPane().setLayout(null); | ||
JLabel L = new JLabel(new ImageIcon(this.getClass().getClassLoader().getResource("resources/about.png"))); | ||
L.setHorizontalAlignment(SwingConstants.CENTER); | ||
L.setBounds(0, 0, 500, 500); | ||
getContentPane().add(L); | ||
|
||
JButton gitbtn = new JButton(new ImageIcon(this.getClass().getClassLoader().getResource("resources/git.png"))); | ||
gitbtn.setBackground(Color.WHITE); | ||
gitbtn.setBounds(208, 511, 100, 40); | ||
getContentPane().add(gitbtn); | ||
gitbtn.addActionListener(new ActionListener() { | ||
public void actionPerformed(ActionEvent e) { | ||
Desktop desktop = Desktop.isDesktopSupported() ? Desktop.getDesktop() : null; | ||
if (desktop != null && desktop.isSupported(Desktop.Action.BROWSE)) { | ||
try { | ||
desktop.browse(new URL("https://github.com/shreyask21/assetmgmt/").toURI()); | ||
} catch (Exception ex) { | ||
ex.printStackTrace(); | ||
} | ||
} | ||
} | ||
}); | ||
|
||
} | ||
|
||
public void display() { | ||
this.setVisible(true); | ||
} | ||
|
||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package GUI; | ||
|
||
import javax.swing.JOptionPane; | ||
|
||
public class error_dialog { | ||
public static void showError(String error) { | ||
JOptionPane.showMessageDialog (null, error, "Something went Wrong", JOptionPane.ERROR_MESSAGE); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.