My Profile
Active Members
TodayLast 7 Days
more...
Awards & Gifts
Online Exams
Fresher Jobs
Our fresher job section is exclusively for fresh graduates! Find jobs for freshers in major Indian
cities including Bangalore, Chennai, Hyderabad, Pune or Kochi
Resources
Find educational articles, blogs, discussion threads and other resources.
Colleges
Find details about any college in India or search for courses.
|
Creating new screen using setVisible
Posted Date:
Total Responses: 0
Posted By: Mahesh Member Level: Platinum Points/Cash: 8
|
// Please do not edit code in between the comments "//" and "// // Any changes made within the comments will be lost ,if regenerated. // Kindly refer to tcats_edit_source_files.html file under help/source_generation directory for details
package com.adventnet.ebon.chassis; import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.io.*;
public class new_screen1 extends JFrame { // private boolean initialized = false; private java.applet.Applet applet = null; private boolean running=false; javax.swing.JPanel Top = null; com.adventnet.beans.charts.AdventNetPieChart AdventNetPieChart2 = null; com.adventnet.beans.charts.AdventNetPieChart AdventNetPieChart1 = null; //
public void setVisible(boolean bl) { // if(bl) { init(); start(); } else { stop(); } super.setVisible(bl); // }
public void stop() { // if(!running) return; running=false;
// } public void start() { // if(running) return; running=true;
// } public void init() { // if (initialized) return; this.setSize(getPreferredSize().width+126,getPreferredSize().height+280); setTitle("new_screen1"); Container container = getContentPane(); container.setLayout(new BorderLayout()); try { initVariables(); setUpGUI(container); setUpProperties(); setUpConnections(); } catch(Exception ex) { showStatus("Error in init method",ex); } // let us set the initialized variable to true so // we dont initialize again even if init is called initialized = true;
// } public String getParameter(String input) { // String value = null; if ( applet != null) { value = applet.getParameter(input); } else { value = (String)com.adventnet.apiutils.Utility.getParameter(input); } if(value == null) { if (input.equals("PORT")) value = "161"; if (input.equals("CLIENT_CLASS_NAME")) value = "com.adventnet.management.transport.TcpClientTransportImpl"; if (input.equals("MS_MODE")) value = "3"; if (input.equals("ManagedObjectName")) value = "nilamchand"; if (input.equals("CLIENT_SERVER")) value = "TCP"; if (input.equals("URLPREFIX")) value = "./projects/eBonChassis/xml"; if (input.equals("MS_HOST")) value = "localhost"; if (input.equals("HOST")) value = "localhost"; if (input.equals("MS_PORT")) value = "9001"; } return value;
// } public void setUpProperties() { //
//
//
try { AdventNetPieChart2.setOpaque(true); AdventNetPieChart2.setForeground(new Color(-16777216)); AdventNetPieChart2.setBackground(new Color(-1442050)); AdventNetPieChart2.setHeaderText("Title"); AdventNetPieChart2.setHeaderFont(new Font("Times New Roman",1,18)); } catch(Exception ex) { showStatus("Exception while setting properties for bean "+AdventNetPieChart2,ex); }
//
//
try { AdventNetPieChart1.setOpaque(true); AdventNetPieChart1.setForeground(new Color(-16777216)); AdventNetPieChart1.setBackground(new Color(-1442050)); AdventNetPieChart1.setHeaderText("Title"); AdventNetPieChart1.setHeaderFont(new Font("Times New Roman",1,18)); } catch(Exception ex) { showStatus("Exception while setting properties for bean "+AdventNetPieChart1,ex); }
//
//
// } public void initVariables() { // Top= new javax.swing.JPanel(); AdventNetPieChart2= new com.adventnet.beans.charts.AdventNetPieChart(); AdventNetPieChart1= new com.adventnet.beans.charts.AdventNetPieChart();
// } public void setUpGUI(Container container) { // container.add(Top,BorderLayout.CENTER); Top.setLayout(null); AdventNetPieChart2.setBounds(5,140,110,130); Top.add(AdventNetPieChart2); AdventNetPieChart1.setBounds(5,5,110,130); Top.add(AdventNetPieChart1);
// } public void setUpConnections() { //
// }
public void showStatus(String message) { // System.out.println("Internal Error :"+ message); // } public void showStatus(String message,Exception ex) { // System.out.println("Internal Error :"+ message); ex.printStackTrace(); // }
public new_screen1() { // pack(); // }
public new_screen1(java.applet.Applet applet) { // this.applet = applet; pack(); this.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); // } public void setProperties(java.util.Properties props) { //
// } }
|
Project Feedbacks
|
No feedbacks found. Be the first to respond and make money from revenue sharing program.
|
|
|
| Post Feedback |
|
|
You must Sign In to post a feedback.
|
|
|
|
|
Advertise Here
|