Wyrmrush 131 Posted January 4, 2022 Report Share Posted January 4, 2022 How to add icon to anguish/ascend/ethos Just go to Gamewindows replace that with this package com.client; import java.net.*; import java.util.Arrays; import java.awt.*; import java.awt.event.ActionListener; import java.awt.event.ActionEvent; import java.awt.event.WindowListener; import java.awt.image.BufferedImage; import java.io.IOException; import javax.imageio.ImageIO; import javax.swing.*; import org.omg.CORBA.portable.InputStream; import com.client.features.settings.InformationFile; import com.client.loader.Loader; import com.sun.javafx.util.Utils; import com.sun.xml.internal.ws.api.ResourceLoader; public class ClientWindow extends Client implements ActionListener, WindowListener { private static final long serialVersionUID = -6978617783576386732L; private static final String location = null; private InformationFile informationFile = new InformationFile(); String userNameFrameTitle; private Image icon; public void initUI() { try { icon = new ImageIcon(new URL("https://i.stack.imgur.com/KSnus.gif")).getImage(); UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); frame = new JFrame(Configuration.CLIENT_TITLE); frame.setLayout(new BorderLayout()); try { java.io.InputStream inputStream = ClassLoader.getSystemResourceAsStream("icon.png"); if (inputStream == null) { System.err.println("Could not load icon image."); } else { BufferedImage bufferedImage = ImageIO.read(inputStream); frame.setIconImage(bufferedImage); } } catch (IOException iOException) { System.err.println("Cannot get icon image from url."); } setFocusTraversalKeysEnabled(false); frame.setResizable(false); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JPanel gamePanel = new JPanel(); gamePanel.setLayout(new BorderLayout()); gamePanel.add(this); gamePanel.setPreferredSize(new Dimension(765, 503)); frame.getContentPane().add(gamePanel, BorderLayout.CENTER); frame.pack(); insets = frame.getInsets(); frame.setLocationRelativeTo(null); frame.setVisible(true); init(); } catch (Exception e) { e.printStackTrace(); } } private void setIconImage(Image bimg) { // TODO Auto-generated method stub } private String getClientUserName() { return Client.myPlayer.name; } public ClientWindow(String args[]) { super(); try { com.client.sign.Signlink.startpriv(InetAddress.getByName(server)); initUI(); } catch (Exception ex) { ex.printStackTrace(); } } @Override public URL getCodeBase() { try { return new URL("http://" + server + "/overlays"); } catch (Exception e) { return super.getCodeBase(); } } @Override public URL getDocumentBase() { return getCodeBase(); } public void loadError(String s) { System.out.println("loadError: " + s); } @Override public String getParameter(String key) { return ""; } @Override public void actionPerformed(ActionEvent evt) { } private static JFrame frame; public static JFrame getFrame() { return frame; } private static Insets insets; public static Insets getInset() { return insets; } } then take the iconof you client to client folder and that's it ,your client has an icon enjoy! Join my This is the hidden content, please Sign In or Sign Up 1 Link to comment Share on other sites More sharing options...
SynatrusLv 7 Posted January 6, 2022 Report Share Posted January 6, 2022 farming posts , dont mind me Link to comment Share on other sites More sharing options...
Wiz Khalifa 0 Posted January 19, 2022 Report Share Posted January 19, 2022 ^ Following Link to comment Share on other sites More sharing options...
Ary3x 0 Posted February 14, 2022 Report Share Posted February 14, 2022 awesome ty Link to comment Share on other sites More sharing options...
rensuki 0 Posted June 9, 2023 Report Share Posted June 9, 2023 tyvm Link to comment Share on other sites More sharing options...
 omg fd up 412 Posted July 19, 2023 Report Share Posted July 19, 2023 On 1/4/2022 at 4:05 PM, Wyrmrush said: How to add icon to anguish/ascend/ethos Just go to Gamewindows replace that with this package com.client; import java.net.*; import java.util.Arrays; import java.awt.*; import java.awt.event.ActionListener; import java.awt.event.ActionEvent; import java.awt.event.WindowListener; import java.awt.image.BufferedImage; import java.io.IOException; import javax.imageio.ImageIO; import javax.swing.*; import org.omg.CORBA.portable.InputStream; import com.client.features.settings.InformationFile; import com.client.loader.Loader; import com.sun.javafx.util.Utils; import com.sun.xml.internal.ws.api.ResourceLoader; public class ClientWindow extends Client implements ActionListener, WindowListener { private static final long serialVersionUID = -6978617783576386732L; private static final String location = null; private InformationFile informationFile = new InformationFile(); String userNameFrameTitle; private Image icon; public void initUI() { try { icon = new ImageIcon(new URL("https://i.stack.imgur.com/KSnus.gif")).getImage(); UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); frame = new JFrame(Configuration.CLIENT_TITLE); frame.setLayout(new BorderLayout()); try { java.io.InputStream inputStream = ClassLoader.getSystemResourceAsStream("icon.png"); if (inputStream == null) { System.err.println("Could not load icon image."); } else { BufferedImage bufferedImage = ImageIO.read(inputStream); frame.setIconImage(bufferedImage); } } catch (IOException iOException) { System.err.println("Cannot get icon image from url."); } setFocusTraversalKeysEnabled(false); frame.setResizable(false); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JPanel gamePanel = new JPanel(); gamePanel.setLayout(new BorderLayout()); gamePanel.add(this); gamePanel.setPreferredSize(new Dimension(765, 503)); frame.getContentPane().add(gamePanel, BorderLayout.CENTER); frame.pack(); insets = frame.getInsets(); frame.setLocationRelativeTo(null); frame.setVisible(true); init(); } catch (Exception e) { e.printStackTrace(); } } private void setIconImage(Image bimg) { // TODO Auto-generated method stub } private String getClientUserName() { return Client.myPlayer.name; } public ClientWindow(String args[]) { super(); try { com.client.sign.Signlink.startpriv(InetAddress.getByName(server)); initUI(); } catch (Exception ex) { ex.printStackTrace(); } } @Override public URL getCodeBase() { try { return new URL("http://" + server + "/overlays"); } catch (Exception e) { return super.getCodeBase(); } } @Override public URL getDocumentBase() { return getCodeBase(); } public void loadError(String s) { System.out.println("loadError: " + s); } @Override public String getParameter(String key) { return ""; } @Override public void actionPerformed(ActionEvent evt) { } private static JFrame frame; public static JFrame getFrame() { return frame; } private static Insets insets; public static Insets getInset() { return insets; } } then take the iconof you client to client folder and that's it ,your client has an icon enjoy! Join my Hidden Content Give reaction or reply to this topic to see the hidden content. Following Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now