Help in adding SessionBean class
Hi,
I'm having a hard time adding the class path for the SessionBean class. Do you guys know where this class is?
Thanks
Look for j2ee.jar (the class is javax.ejb.SessionBean)
Similar Messages
-
Help with a hangman class with Gui
Gah, so I'm creating a Java Hangman program using a gui program. Everything was working fine till I started adding the program to the gui. I'm hopelessly confused, and I can't seem to get it working. Help appreciated! Thanks guys... I'm really bad at this, sorry for the noob question.
import java.awt.BorderLayout;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.io.File;
import java.util.Random;
import java.util.Scanner;
import javax.accessibility.AccessibleContext;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.plaf.PanelUI;
public class hmg extends JPanel {
private char[] word;
private int Misses;
private int myWordIndex;
private int index;
private boolean[] used;
protected Image[] i = new Image[8];
protected Image[] s = new Image[3];
private final static char NADA = '_';
private final static int GUESSES = 8;
private String fileName;
i[0] = Toolkit.getDefaultToolkit().getImage(
"C:\\Documents and Settings\\mfleming\\Desktop\\hang1.jpg");
i[1] = Toolkit.getDefaultToolkit().getImage(
"C:\\Documents and Settings\\mfleming\\Desktop\\hang2.jpg");
i[2] = Toolkit.getDefaultToolkit().getImage(
"C:\\Documents and Settings\\mfleming\\Desktop\\hang3.jpg");
i[3] = Toolkit.getDefaultToolkit().getImage(
"C:\\Documents and Settings\\mfleming\\Desktop\\hange4.jpg");
i[4] = Toolkit.getDefaultToolkit().getImage(
"C:\\Documents and Settings\\mfleming\\Desktop\\hang5.jpg");
i[5] = Toolkit.getDefaultToolkit().getImage(
"C:\\Documents and Settings\\mfleming\\Desktop\\hang6.jpg");
i[6] = Toolkit.getDefaultToolkit().getImage(
"C:\\Documents and Settings\\mfleming\\Desktop\\hang7.jpg");
i[7] = Toolkit.getDefaultToolkit().getImage(
"C:\\Documents and Settings\\mfleming\\Desktop\\hang8.jpg");
s[0] = Toolkit.getDefaultToolkit().getImage(
"C:\\Documents and Settings\\mfleming\\Desktop\\hacks.jpg");
s[1] = Toolkit.getDefaultToolkit().getImage(
"C:\\Documents and Settings\\mfleming\\Desktop\\hacks.jpg");
s[2] = Toolkit.getDefaultToolkit().getImage(
"C:\\Documents and Settings\\mfleming\\Desktop\\hacks.jpg");
protected int x = 0;
protected ImageIcon icon = new ImageIcon(i[x++]);
protected ImageIcon icon2 = new ImageIcon(s[x++]);
private JLabel j = new JLabel(icon);
private JButton b = new JButton();
private JLabel a = new JLabel();
private String[] wordArray;
private String wordChosen;
public void paintComponent(Graphics g) {
super.paintComponents(g);
public hmg() {
this.add(j);
JButton guess = new JButton("The Click of Faith!");
this.add(guess, BorderLayout.WEST);
guess.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if (!(x == i.length)) {
icon = new ImageIcon(i[x++]);
j.setIcon(icon);
JButton guess2 = new JButton("Click here if your almost dead! ");
this.add(guess2, BorderLayout.WEST);
guess2.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
icon2 = new ImageIcon(s[x++]);
j.setIcon(icon);
this.add(a, BorderLayout.SOUTH);
a.setText(showWord());
a.setText(play());
Misses = 0;
index = 0;
used = new boolean[Character.MAX_VALUE];
// public void actionPerformed(ActionEvent arg0) {
// if (!(x == i.length)) {
// icon = new ImageIcon(i[x++]);
// j.setIcon(icon);
private void clear() {
int k;
for (k = 0; k < Character.MAX_VALUE; k++) {
used[k] = false;
word = new char[myWords[myWordIndex].length()];
for (k = 0; k < word.length; k++) {
word[k] = NADA;
private void guess(char ch) {
int b;
boolean charFound = false;
ch = Character.toLowerCase(ch);
for (b = 0; b < word.length; b++) {
if (!used[ch] && myWords[index].charAt(b) == ch) {
word[b] = ch;
charFound = true;
if (!used[ch] && !charFound) {
Misses++;
used[ch] = true;
private void chooseRandomWord()
// myWords[];
// loadFileList();
Random generator = new Random();
int x = generator.nextInt(wordArray.length);
wordChosen = wordArray[x];
//public void processFile(String commonWords) {
// wordArray = commonWords.split(",");
//private String[] loadFileList() {
// try
// fileName = "C:\\Documents and Settings\\mfleming\\Desktop\\Wordlist";
// File file = new File("C:\\Documents and
// Settings\\mfleming\\Desktop\\Wordlist");
// if(file.exists());
// Scanner scan = new Scanner(file);
// while(scan.hasNext())
// String word = scan.next();
// processFile(word);
// } catch (Exception e)
// e.printStackTrace();
// return wordArray;
// public void add() {
// try {
// Scanner s = new Scanner(new File("Wordlist"));
// while (s.hasNext())
// } catch (Exception e) {
private String showWord() {
int k;
String temp = "";
for (k = 0; k < word.length; k++) {
temp +=word[k];
// System.out.print(word[k] + " ");
return temp;
// return showWord();
// System.out.println(" \nYou have exactly " + (GUESSES - Misses)
// + " guesses left! Time is running out! Cue Music LOL ");
private boolean wordGuessed() {
int a;
for (a = 0; a < word.length; a++) {
if (word[a] == NADA) {
return false;
return true;
// .setIcon --- Put image.
public String play() {
clear();
String temp = "";
while (true) {
// showWord();
a.setText(showWord());
//May not have to return string.
// System.out
// .print("Your guess shall be? 1234567890abcdefhijklmnopqrstuvqxyz hA! Guess... it's simply up to you!");
String s = Blah.readString();
if (s.length() > 0) {
guess(s.charAt(0));
if (Misses >= GUESSES) {
// System.out.println("You killed your hangman because....");
// System.out.println(storeWord);
break;
} else if (wordGuessed()) {
// System.out.println("You win. You suck. LOL. ><");
// System.out.println(word);
break;
index = (index + 1) / myWords.length;
return temp;
// public String storeWord() {
// return SW;
public static final void main(String args[]) {
hmg hmg = new hmg();
hmg.play();
private class MousePressedListener implements MouseListener {
public void mousePressed(MouseEvent e) {
if (e.getButton() == e.BUTTON1) {
((JButton) e.getSource()).setText("X");
if (e.getButton() == e.BUTTON3) {
((JButton) e.getSource()).setText("O");
* (non-Javadoc)
* @see java.awt.event.MouseListener#mouseClicked(java.awt.event.MouseEvent)
public void mouseClicked(MouseEvent arg0) {
// TODO Auto-generated method stub
* (non-Javadoc)
* @see java.awt.event.MouseListener#mouseEntered(java.awt.event.MouseEvent)
public void mouseEntered(MouseEvent arg0) {
// TODO Auto-generated method stub
* (non-Javadoc)
* @see java.awt.event.MouseListener#mouseExited(java.awt.event.MouseEvent)
public void mouseExited(MouseEvent arg0) {
// TODO Auto-generated method stub
* (non-Javadoc)
* @see java.awt.event.MouseListener#mouseReleased(java.awt.event.MouseEvent)
public void mouseReleased(MouseEvent arg0) {
// TODO Auto-generated method stub
* (non-Javadoc)
* @see java.awt.Component#getAccessibleContext()
public AccessibleContext getAccessibleContext() {
// TODO Auto-generated method stub
return super.getAccessibleContext();
* (non-Javadoc)
* @see javax.swing.JPanel#getUI()
public PanelUI getUI() {
// TODO Auto-generated method stub
return super.getUI();
* (non-Javadoc)
* @see javax.swing.JComponent#getUIClassID()
public String getUIClassID() {
// TODO Auto-generated method stub
return super.getUIClassID();
* (non-Javadoc)
* @see java.awt.Component#paramString()
protected String paramString() {
// TODO Auto-generated method stub
return super.paramString();
* (non-Javadoc)
* @see javax.swing.JPanel#setUI(javax.swing.plaf.PanelUI)
public void setUI(PanelUI arg0) {
// TODO Auto-generated method stub
super.setUI(arg0);
* (non-Javadoc)
* @see javax.swing.JComponent#updateUI()
public void updateUI() {
// TODO Auto-generated method stub
super.updateUI();
private String myWords[] = { "analysis", "approach", "area", "assessment",
"assume", "authority ", "available", "benefit ", "concept ",
"consistent", "constitutional", "context", "contract", "create",
"data", "definition", "derived ", "distribution ", "economic",
"environment ", "established", "estimate ", "evidence", "export",
"factors", "financial", "formula", "function", "identified",
"income", "indicate ", "individual ", "interpretation",
"involved", "issues", "labour", "legal", "legislation", "major ",
"method", "occur", "percent ", "period", "policy", "principle",
"procedure", "process", "required", "research", "response", "role",
"section", "sector", "significant ", "similar", "source",
"specific", "structure", "theory", "variables", "achieve ",
"acquisition", "administration ", "affect", "appropriate ",
"aspects", "assistance ", "categories", "chapter", "commission",
"community", "complex ", "computer ", "conclusion", "conduct",
"consequences", "construction", "consumer ", "credit", "cultural ",
"design", "distinction", "elements ", "equation", "evaluation ",
"features ", "final", "focus", "impact", "injury", "institute ",
"investment", "items", "journal ", "maintenance", "normal",
"obtained ", "participation", "perceived ", "positive ",
"potential", "previous", "primary ", "purchase ", "range ",
"region", "regulations", "relevant ", "resident", "resources",
"restricted ", "security ", "sought", "select", "site",
"strategies", "survey", "text", "traditional", "transfer",
"alternative", "circumstances ", "comments", "compensation",
"components", "consent", "considerable", "constant ",
"constraints", "contribution", "convention ", "coordination",
"core", "corporate ", "corresponding", "criteria", "deduction",
"demonstrate ", "document", "dominant", "emphasis ", "ensure",
"excluded", "framework ", "funds", "illustrated ", "immigration",
"implies", "initial ", "instance ", "interaction", "justification",
"layer", "link", "location", "maximum ", "minorities", "negative ",
"outcomes", "partnership", "philosophy ", "physical ",
"proportion ", "published ", "reaction", "registered ", "reliance",
"removed", "scheme", "sequence", "sex", "shift", "specified ",
"sufficient", "task", "technical ", "techniques", "technology",
"validity", "volume", "access", "adequate", "annual", "apparent",
"approximated", "attitudes ", "attributed ", "civil", "code",
"commitment ", "communication", "concentration", "conference ",
"contrast ", "cycle", "debate", "despite ", "dimensions ",
"domestic ", "emerged ", "error", "ethnic", "goals", "granted",
"hence", "hypothesis ", "implementation", "implications",
"imposed", "integration", "internal ", "investigation", "job",
"label", "mechanism ", "obvious", "occupational ", "option",
"output", "overall ", "parallel", "parameters", "phase",
"predicted", "principal", "prior", "professional", "project",
"promote", "regime", "resolution ", "retained", "series",
"statistics ", "status", "stress", "subsequent", "sum", "summary",
"undertaken ", "academic ", "adjustment ", "alter ", "amendment ",
"aware ", "capacity ", "challenge ", "clause ", "compounds ",
"conflict ", "consultation ", "contact ", "decline ",
"discretion ", "draft ", "enable ", "energy ", "enforcement ",
"entities ", "equivalent ", "evolution ", "expansion ",
"exposure ", "external ", "facilitate ", "fundamental ",
"generated ", "generation ", "image ", "liberal", "licence ",
"logic ", "marginal ", "medical ", "mental ", "modified ",
"monitoring ", "network ", "notion ", "objective ", "orientation ",
"perspective ", "precise ", "prime ", "psychology ", "pursue ",
"ratio ", "rejected ", "revenue ", "stability ", "styles ",
"substitution ", "sustainable", "symbolic ", "target ",
"transition ", "trend ", "version ", "welfare ", "whereas ",
"abstract ", "accurate ", "acknowledged ", "aggregate ",
"allocation ", "assigned ", "attached ", "author ", "bond ",
"brief ", "capable ", "cited ", "cooperative ", "discrimination ",
"display ", "diversity ", "domain ", "edition ", "enhanced ",
"estate ", "exceed ", "expert ", "explicit ", "federal ", "fees ",
"flexibility ", "furthermore ", "gender ", "ignored ",
"incentive ", "incidence ", "incorporated ", "index ",
"inhibition ", "initiatives ", "input ", "instructions ",
"intelligence ", "interval ", "lecture ", "migration ", "minimum ",
"ministry ", "motivation ", "neutral ", "nevertheless ",
"overseas ", "preceding ", "presumption ", "rational ",
"recovery ", "revealed ", "scope ", "subsidiary ", "tapes ",
"trace ", "transformation ", "transport ", "underlying ",
"utility ", "adaptation ", "adults ", "advocate ", "aid ",
"channel ", "chemical", "classical ", "comprehensive ",
"comprise ", "confirmed ", "contrary ", "converted ", "couple ",
"decades ", "definite", "deny ", "differentiation ", "disposal ",
"dynamic ", "eliminate ", "empirical ", "equipment ", "extract ",
"file ", "finite ", "foundation ", "global ", "grade ",
"guarantee ", "hierarchical ", "identical ", "ideology ",
"inferred ", "innovation ", "insert ", "intervention ",
"isolated ", "media ", "mode ", "paradigm ", "phenomenon ",
"priority ", "prohibited ", "publication ", "quotation ",
"release ", "reverse ", "simulation ", "solely ", "somewhat ",
"submitted ", "successive ", "survive ", "thesis ", "topic ",
"transmission ", "ultimately ", "unique ", "visible ",
"voluntary ", "abandon ", "accompanied ", "accumulation ",
"ambiguous ", "appendix ", "appreciation ", "arbitrary ",
"automatically ", "bias ", "chart ", "clarity", "conformity ",
"commodity ", "complement ", "contemporary ", "contradiction ",
"crucial ", "currency ", "denote ", "detected ", "deviation ",
"displacement ", "dramatic ", "eventually ", "exhibit ",
"exploitation ", "fluctuations ", "guidelines ", "highlighted ",
"implicit ", "induced ", "inevitably ", "infrastructure ",
"inspection ", "intensity ", "manipulation ", "minimised ",
"nuclear ", "offset ", "paragraph ", "plus ", "practitioners ",
"predominantly ", "prospect ", "radical ", "random ",
"reinforced ", "restore ", "revision ", "schedule ", "tension ",
"termination ", "theme ", "thereby ", "uniform ", "vehicle ",
"via ", "virtually ", "widespread ", "visual ", "accommodation ",
"analogous ", "anticipated ", "assurance ", "attained ", "behalf ",
"bulk ", "ceases ", "coherence ", "coincide ", "commenced ",
"incompatible ", "concurrent ", "confined ", "controversy ",
"conversely ", "device ", "devoted ", "diminished ", "distorted",
"distortion", "equal", "figures", "duration ", "erosion ",
"ethical ", "format ", "founded ", "inherent ", "insights ",
"integral ", "intermediate ", "manual ", "mature ", "mediation ",
"medium ", "military ", "minimal ", "mutual ", "norms ",
"overlap ", "passive ", "portion ", "preliminary ", "protocol ",
"qualitative ", "refine ", "relaxed ", "restraints ",
"revolution ", "rigid ", "route ", "scenario ", "sphere ",
"subordinate ", "supplementary ", "suspended ", "team ",
"temporary ", "trigger ", "unified ", "violation ", "vision ",
"adjacent ", "albeit ", "assembly ", "collapse ", "colleagues ",
"compiled ", "conceived ", "convinced ", "depression ",
"encountered ", "enormous ", "forthcoming ", "inclination ",
"integrity ", "intrinsic ", "invoked ", "levy ", "likewise ",
"nonetheless ", "notwithstanding ", "odd ", "ongoing ", "panel ",
"persistent ", "posed ", "reluctant ", "straightforward ",
"undergo ", "whereby ", "noob", "frag", "punish", "lamer", "noobs",
"knife", "shank", "humvee", "sniper", "don't", "run", "you'll",
"only", "die", "tired", "LOL", "ROFL", "GG", "FTW", "indeed",
"sure", "yeah", "yea", "hi", "hello", };
DRIVER CLASS
import java.awt.BorderLayout;
import java.awt.Container;
import javax.swing.JFrame;
public class HangManGuiTest {
public static void main(String[] args) {
// hangmangui hmg = new hangmangui();
hmg hmg = new hmg();
JFrame frame = new JFrame("Hangman! DJ Joker[8]Baller");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setContentPane(hmg);
frame.pack();
frame.show();
// JFrame j = new JFrame();
// Listeners - Control everything - Call stuff from hmg.
// frame.getContentPane().add(hmg);
// j.setSize(500, 500);
// j.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
// j.setVisible(true);
hmg.play();
Message was edited by:
joker8ballerHey! Thanks for the tip...
Anyways, I fixed all of the errors (T hank god) and now all I have t o do is add the text to the gui. Help for adding the text into the gui. When I run it, it runs a gui, and it shows the spaces, but when I put in input.. nothing shows up and nothing plays.
So I'm going to use a.setText... for showWord and and play()... Is there anything else I woiuld need to do?
import java.awt.BorderLayout;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.io.File;
import java.util.Random;
import java.util.Scanner;
import javax.accessibility.AccessibleContext;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.plaf.PanelUI;
public class hmg extends JPanel {
private char[] word;
private int Misses;
private int myWordIndex;
private int index;
private boolean[] used;
protected Image[] i = new Image[8];
protected Image[] s = new Image[3];
private final static char NADA = '_';
private final static int GUESSES = 8;
private String fileName;
i[0] = Toolkit.getDefaultToolkit().getImage(
"C:\\Documents and Settings\\mfleming\\Desktop\\hang1.jpg");
i[1] = Toolkit.getDefaultToolkit().getImage(
"C:\\Documents and Settings\\mfleming\\Desktop\\hang2.jpg");
i[2] = Toolkit.getDefaultToolkit().getImage(
"C:\\Documents and Settings\\mfleming\\Desktop\\hang3.jpg");
i[3] = Toolkit.getDefaultToolkit().getImage(
"C:\\Documents and Settings\\mfleming\\Desktop\\hange4.jpg");
i[4] = Toolkit.getDefaultToolkit().getImage(
"C:\\Documents and Settings\\mfleming\\Desktop\\hang5.jpg");
i[5] = Toolkit.getDefaultToolkit().getImage(
"C:\\Documents and Settings\\mfleming\\Desktop\\hang6.jpg");
i[6] = Toolkit.getDefaultToolkit().getImage(
"C:\\Documents and Settings\\mfleming\\Desktop\\hang7.jpg");
i[7] = Toolkit.getDefaultToolkit().getImage(
"C:\\Documents and Settings\\mfleming\\Desktop\\hang8.jpg");
s[0] = Toolkit.getDefaultToolkit().getImage(
"C:\\Documents and Settings\\mfleming\\Desktop\\hacks.jpg");
s[1] = Toolkit.getDefaultToolkit().getImage(
"C:\\Documents and Settings\\mfleming\\Desktop\\hacks.jpg");
s[2] = Toolkit.getDefaultToolkit().getImage(
"C:\\Documents and Settings\\mfleming\\Desktop\\hacks.jpg");
protected int x = 0;
protected ImageIcon icon = new ImageIcon(i[x++]);
protected ImageIcon icon2 = new ImageIcon(s[x++]);
private JLabel j = new JLabel(icon);
private JButton b = new JButton();
private JLabel a = new JLabel();
private String[] wordArray;
private String wordChosen;
public void paintComponent(Graphics g) {
super.paintComponents(g);
public hmg() {
this.add(j);
JButton guess = new JButton("The Click of Faith!");
this.add(guess, BorderLayout.WEST);
guess.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if (!(x == i.length)) {
icon = new ImageIcon(i[x++]);
j.setIcon(icon);
JButton guess2 = new JButton("Click here if your almost dead! ");
this.add(guess2, BorderLayout.WEST);
guess2.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
icon2 = new ImageIcon(s[x++]);
j.setIcon(icon);
// this.add(a, BorderLayout.SOUTH);
// a.setText(clear());
// a.setText(showWord());
// a.setText(play());
Misses = 0;
index = 0;
used = new boolean[Character.MAX_VALUE];
// public void actionPerformed(ActionEvent arg0) {
// if (!(x == i.length)) {
// icon = new ImageIcon(i[x++]);
// j.setIcon(icon);
private void clear() {
int k;
for (k = 0; k < Character.MAX_VALUE; k++) {
used[k] = false;
word = new char[myWords[myWordIndex].length()];
System.out.println(word.length);
for (k = 0; k < word.length; k++) {
word[k] = NADA;
private void guess(char ch) {
int b;
boolean charFound = false;
ch = Character.toLowerCase(ch);
for (b = 0; b < word.length; b++) {
if (!used[ch] && myWords[index].charAt(b) == ch) {
word[b] = ch;
charFound = true;
if (!used[ch] && !charFound) {
Misses++;
used[ch] = true;
private void chooseRandomWord()
// myWords[];
// loadFileList();
Random generator = new Random();
int x = generator.nextInt(wordArray.length);
wordChosen = wordArray[x];
//public void processFile(String commonWords) {
// wordArray = commonWords.split(",");
//private String[] loadFileList() {
// try
// fileName = "C:\\Documents and Settings\\mfleming\\Desktop\\Wordlist";
// File file = new File("C:\\Documents and
// Settings\\mfleming\\Desktop\\Wordlist");
// if(file.exists());
// Scanner scan = new Scanner(file);
// while(scan.hasNext())
// String word = scan.next();
// processFile(word);
// } catch (Exception e)
// e.printStackTrace();
// return wordArray;
// public void add() {
// try {
// Scanner s = new Scanner(new File("Wordlist"));
// while (s.hasNext())
// } catch (Exception e) {
private String showWord() {
int k;
String temp = "";
for (k = 0; k < word.length; k++) {
temp +=word[k];
// System.out.print(word[k] + " ");
return temp;
// return showWord();
// System.out.println(" \nYou have exactly " + (GUESSES - Misses)
// + " guesses left! Time is running out! Cue Music LOL ");
private boolean wordGuessed() {
int a;
for (a = 0; a < word.length; a++) {
if (word[a] == NADA) {
return false;
return true;
// .setIcon --- Put image.
public String play() {
clear();
String temp = "";
while (true) {
// showWord();
a.setText(showWord());
//May not have to return string.
JOptionPane.showInputDialog("Your guess shall be? 1234567890abcdefhijklmnopqrstuvqxyz hA! Guess... its simply up to you!");
// System.out
// .print("Your guess shall be? 1234567890abcdefhijklmnopqrstuvqxyz hA! Guess... it's simply up to you!");
String s = Blah.readString();
if (s.length() > 0) {
guess(s.charAt(0));
if (Misses >= GUESSES) {
JOptionPane.showMessageDialog(null,"You killed your hangman because....");
// System.out.println("You killed your hangman because....");
// System.out.println(storeWord);
break;
} else if (wordGuessed()) {
JOptionPane.showMessageDialog(null, "You win. You suck. LOL. ><");
// System.out.println("You win. You suck. LOL. ><");
// System.out.println(word);
break;
index = (index + 1) / myWords.length;
return temp;
// public String storeWord() {
// return SW;
public static final void main(String args[]) {
hmg hmg = new hmg();
hmg.play();
* (non-Javadoc)
* @see java.awt.event.MouseListener#mouseClicked(java.awt.event.MouseEvent)
public void mouseClicked(MouseEvent arg0) {
// TODO Auto-generated method stub
* (non-Javadoc)
* @see java.awt.event.MouseListener#mouseEntered(java.awt.event.MouseEvent)
public void mouseEntered(MouseEvent arg0) {
// TODO Auto-generated method stub
* (non-Javadoc)
* @see java.awt.event.MouseListener#mouseExited(java.awt.event.MouseEvent)
public void mouseExited(MouseEvent arg0) {
// TODO Auto-generated method stub
* (non-Javadoc)
* @see java.awt.event.MouseListener#mouseReleased(java.awt.event.MouseEvent)
public void mouseReleased(MouseEvent arg0) {
// TODO Auto-generated method stub
* (non-Javadoc)
* @see java.awt.Component#getAccessibleContext()
public AccessibleContext getAccessibleContext() {
// TODO Auto-generated method stub
return super.getAccessibleContext();
* (non-Javadoc)
* @see javax.swing.JPanel#getUI()
public PanelUI getUI() {
// TODO Auto-generated method stub
return super.getUI();
* (non-Javadoc)
* @see javax.swing.JComponent#getUIClassID()
public String getUIClassID() {
// TODO Auto-generated method stub
return super.getUIClassID();
* (non-Javadoc)
* @see java.awt.Component#paramString()
protected String paramString() {
// TODO Auto-generated method stub
return super.paramString();
* (non-Javadoc)
* @see javax.swing.JPanel#setUI(javax.swing.plaf.PanelUI)
public void setUI(PanelUI arg0) {
// TODO Auto-generated method stub
super.setUI(arg0);
* (non-Javadoc)
* @see javax.swing.JComponent#updateUI()
public void updateUI() {
// TODO Auto-generated method stub
super.updateUI();
private String myWords[] = { "approach", "area", "assessment",
"assume", "authority ", "available", "benefit ", "concept ",
"consistent", "constitutional", "context", "contract", "create",
"data", "definition", "derived ", "distribution ", "economic",
"environment ", "established", "estimate ", "evidence", "export",
"factors", "financial", "formula", "function", "identified",
"income", "indicate ", "individual ", "interpretation",
"involved", "issues", "labour", "legal", "legislation", "major ",
"method", "occur", "percent ", "period", "policy", "principle",
"procedure", "process", "required", "research", "response", "role",
"section", "sector", "significant ", "similar", "source",
"specific", "structure", "theory", "variables", "achieve ",
"acquisition", "administration ", "affect", "appropriate ",
"aspects", "assistance ", "categories", "chapter", "commission",
"community", "complex ", "computer ", "conclusion", "conduct",
"consequences", "construction", "consumer ", "credit", "cultural ",
"design", "distinction", "elements ", "equation", "evaluation ",
"features ", "final", "focus", "impact", "injury", "institute ",
"investment", "items", "journal ", "maintenance", "normal",
"obtained ", "participation", "perceived ", "positive ",
"potential", "previous", "primary ", "purchase ", "range ",
"region", "regulations", "relevant ", "resident", "resources",
"restricted ", "security ", "sought", "select", "site",
"strategies", "survey", "text", "traditional", "transfer",
"alternative", "circumstances ", "comments", "compensation",
"components", "consent", "considerable", "constant ",
"constraints", "contribution", "convention ", "coordination",
"core", "corporate ", "corresponding", "criteria", "deduction",
"demonstrate ", "document", "dominant", "emphasis ", "ensure",
"excluded", "framework ", "funds", "illustrated ", "immigration",
"implies", "initial ", "instance ", "interaction", "justification",
"layer", "link", "location", "maximum ", "minorities", "negative ",
"outcomes", "partnership", "philosophy ", "physical ",
"proportion ", "published ", "reaction", "registered ", "reliance",
"removed", "scheme", "sequence", "sex", "shift", "specified ",
"sufficient", "task", "technical ", "techniques", "technology",
"validity", "volume", "access", "adequate", "annual", "apparent",
"approximated", "attitudes ", "attributed ", "civil", "code",
"commitment ", "communication", "concentration", "conference ",
"contrast ", "cycle", "debate", "despite ", "dimensions ",
"domestic ", "emerged ", "error", "ethnic", "goals", "granted",
"hence", "hypothesis ", "implementation", "implications",
"imposed", "integration", "internal ", "investigation", "job",
"label", "mechanism ", "obvious", "occupational ", "option",
"output", "overall ", "parallel", "parameters", "phase",
"predicted", "principal", "prior", "professional", "project",
"promote", "regime", "resolution ", "retained", "series",
"statistics ", "status", "stress", "subsequent", "sum", "summary",
"undertaken ", "academic ", "adjustment ", "alter ", "amendment ",
"aware ", "capacity ", "challenge ", "clause ", "compounds ",
"conflict ", "consultation ", "contact ", "decline ",
"discretion ", "draft ", "enable ", "energy ", "enforcement ",
"entities ", "equivalent ", "evolution ", "expansion ",
"exposure ", "external ", "facilitate ", "fundamental ",
"generated ", "generation ", "image ", "liberal", "licence ",
"logic ", "marginal ", "medical ", "mental ", "modified ",
"monitoring ", "network ", "notion ", "objective ", "orientation ",
"perspective ", "precise ", "prime ", "psychology ", "pursue ",
"ratio ", "rejected ", "revenue ", "stability ", "styles ",
"substitution ", "sustainable", "symbolic ", "target ",
"transition ", "trend ", "version ", "welfare ", "whereas ",
"abstract ", "accurate ", "acknowledged ", "aggregate ",
"allocation ", "assigned ", "attached ", "author ", "bond ",
"brief ", "capable ", "cited ", "cooperative ", "discrimination ",
"display ", "diversity ", "domain ", "edition ", "enhanced ",
"estate ", "exceed ", "expert ", "explicit ", "federal ", "fees ",
"flexibility ", "furthermore ", "gender ", "ignored ",
"incentive ", "incidence ", "incorporated ", "index ",
"inhibition ", "initiatives ", "input ", "instructions ",
"intelligence ", "interval ", "lecture ", "migration ", "minimum ",
"ministry ", "motivation ", "neutral ", "nevertheless ",
"overseas ", "preceding ", "presumption ", "rational ",
"recovery ", "revealed ", "scope ", "subsidiary ", "tapes ",
"trace ", "transformation ", "transport ", "underlying ",
"utility ", "adaptation ", "adults ", "advocate ", "aid ",
"channel ", "chemical", "classical ", "comprehensive ",
"comprise ", "confirmed ", "contrary ", "converted ", "couple ",
"decades ", "definite", "deny ", "differentiation ", "disposal ",
"dynamic ", "eliminate ", "empirical ", "equipment ", "extract ",
"file ", "finite ", "foundation ", "global ", "grade ",
"guarantee ", "hierarchical ", "identical ", "ideology ",
"inferred ", "innovation ", "insert ", "intervention ",
"isolated ", "media ", "mode ", "paradigm ", "phenomenon ",
"priority ", "prohibited ", "publication ", "quotation ",
"release ", "reverse ", "simulation ", "solely ", "somewhat ",
"submitted ", "successive ", "survive ", "thesis ", "topic ",
"transmission ", "ultimately ", "unique ", "visible ",
"voluntary ", "abandon ", "accompanied ", "accumulation ",
"ambiguous ", "appendix ", "appreciation ", "arbitrary ",
"automatically ", "bias ", "chart ", "clarity", "conformity ",
"commodity ", "complement ", "contemporary ", "contradiction ",
"crucial ", "currency ", "denote ", "detected ", "deviation ",
"displacement ", "dramatic ", "eventually ", "exhibit ",
"exploitation ", "fluctuations ", "guidelines ", "highlighted ",
"implicit ", "induced ", "inevitably ", "infrastructure ",
"inspection ", "intensity ", "manipulation ", "minimised ",
"nuclear ", "offset ", "paragraph ", "plus ", "practitioners ",
"predominantly ", "prospect ", "radical ", "random ",
"reinforced ", "restore ", "revision ", "schedule ", "tension ",
"termination ", "theme ", "thereby ", "uniform ", "vehicle ",
"via ", "virtually ", "widespread ", "visual ", "accommodation ",
"analogous ", "anticipated ", "assurance ", "attained ", "behalf ",
"bulk ", "ceases ", "coherence ", "coincide ", "commenced ",
"incompatible ", "concurrent ", "confined ", "controversy ",
"conversely ", "device ", "devoted ", "diminished ", "distorted",
"distortion", "equal", "figures", "duration ", "erosion ",
"ethical ", "format ", "founded ", "inherent ", "insights ",
"integral ", "intermediate ", "manual ", "mature ", "mediation ",
"medium ", "military ", "minimal ", "mutual ", "norms ",
"overlap ", "passive ", "portion ", "preliminary ", "protocol ",
"qualitative ", "refine ", "relaxed ", "restraints ",
"revolution ", "rigid ", "route ", "scenario ", "sphere ",
"subordinate ", "supplementary ", "suspended ", "team ",
"temporary ", "trigger ", "unified ", "violation ", "vision ",
"adjacent ", "albeit ", "assembly ", "collapse ", "colleagues ",
"compiled ", "conceived ", "convinced ", "depression ",
"encountered ", "enormous ", "forthcoming ", "inclination ",
"integrity ", "intrinsic ", "invoked ", "levy ", "likewise ",
"nonetheless ", "notwithstanding ", "odd ", "ongoing ", "panel ",
"persistent ", "posed ", "reluctant ", "straightforward ",
"undergo ", "whereby ", "noob", "frag", "punish", "lamer", "noobs",
"knife", "shank", "humvee", "sniper", "don't", "run", "you'll",
"only", "die", "tired", "LOL", "ROFL", "GG", "FTW", "indeed",
"sure", "yeah", "yea", "hi", "hello", };
}Message was edited by:
joker8baller -
Help with adding image onclick
Hey everyone,
I am making a simple game in AS3 and need help with adding an image once they have click on something.
On the left of the screen are sentences and on the right an image of a form. When they click each sentence on the left, writing appears on the form. Its very simple. With this said, what I would like to do is once the user click one of the sentences on the left, I would like a checkmark image to appear over the sentence so they know they have already clicked on it.
How would I go about adding this to my code?
var fields:Array = new Array();
one_btn.addEventListener(MouseEvent.CLICK, onClick1a);
one_btn.buttonMode = true;
function onClick1a(event:MouseEvent):void
fields.push(new one_form());
fields[fields.length-1].x = 141;
fields[fields.length-1].y = -85;
this.addChild(fields[fields.length-1]);
one_btn.removeEventListener(MouseEvent.CLICK, onClick1a);
one_btn.buttonMode = false;
//gotoAndStop("one")
two_btn.addEventListener(MouseEvent.CLICK, onClick2a);
two_btn.buttonMode = true;
function onClick2a(event:MouseEvent):void
fields.push(new two_form());
fields[fields.length-1].x = 343.25;
fields[fields.length-1].y = -85;
this.addChild(fields[fields.length-1]);
two_btn.removeEventListener(MouseEvent.CLICK, onClick2a);
two_btn.buttonMode = false;
//gotoAndStop("two")I don't know where you're positioning the button that should enable/disable the checkbox but for "one_btn" let's just say it's at position: x=100, y=200. Say you'd want the checkbox to be to the left of it, so the checkbox would be displayed at: x=50, y=200. Also say you have a checkbox graphic in your library, exported for actionscript with the name "CheckBoxGraphic".
Using your code with some sprinkles:
// I'd turn this into a sprite but we'll use the default, MovieClip
var _checkBox:MovieClip = new CheckBoxGraphic();
// add to display list but hide
_checkBox.visible = false;
// just for optimization
_checkBox.mouseEnabled = false;
_checkBox.cacheAsBitmap = true;
// adding it early so make sure the forms loaded don't overlap the
// checkbox or it will cover it, otherwise swapping of depths is needed
addChild(_checkBox);
// I'll use a flag (a reference for this) to know what button is currently pushed
var _currentButton:Object;
one_btn.addEventListener(MouseEvent.CLICK, onClick1a);
one_btn.buttonMode = true;
function onClick1a(event:MouseEvent):void
// Check if this button is currently the pressed button
if (_currentButton == one_btn)
// disable checkbox, remove form
_checkBox.visible = false;
// form should be last added to fields array, remove
removeChild(fields[fields.length - 1]);
fields.pop();
// clear any reference to this button
_currentButton = null;
else
// enable checkbox
_checkBox.visible = true;
_checkBox.x = 50;
_checkBox.y = 200;
// add form
fields.push(new one_form());
fields[fields.length-1].x = 141;
fields[fields.length-1].y = -85;
this.addChild(fields[fields.length-1]);
// save this button as last clicked
_currentButton = one_btn;
// not sure what this is
//gotoAndStop("one")
I'd also centralize all the click handlers into a single handler and use the buttons name to branch on what to do, but that's a different discussion. Just see if this makes sense to you.
The jist is a graphic of a checkbox that is a MovieClip symbol in your library exported to actionscript with the class name CheckBoxGraphic() is created and added to the display list.
I made a variable that points itself to the last clicked button, when the "on" state is desired. If I detect the last clicked button was this button, I remove the form I added and the checkbox. If the last clicked button is not this button, I enable and position the checkbox as well as add the form.
What is left to do is handle the sitation where multiple buttons are on the screen. When a new button is pushed it should remove anything the previous button added. This code simply demonstrates clicking the same button multiple times to toggle it "on and off". -
Need urgent help in adding border to a Box
Hi folks,
i need help in adding a border to the box which i am using in my java code.
i have somthing like.. I am not using BorderLayout as my layout Manager. Its all Flow Layout.
Box name;
Box rules;
Box combine;
name = Box.createVerticalBox();
// i need to add a border to this name box which i am unable to do. Please help
rules = Box.createVerticalBox();
// again here too i want to add a border like etched border. Cant do it
name.add(....);
name.add(...);
rules.add(...);
rules.add(..);
combine = Box.createVerticalBox();
//here too i want to add a border
Please help...
thking u.
regds. divyaYou can use setBorder() method which Box inherits from JComponent...
check the API for Box for further information, namely the "Methods inherited from class javax.swing.JComponent" part...
- MaxxDmg...
- ' He who never sleeps... ' -
F4 Help in ALV GRID class based
hi
you have any idea about how to invoke the F4 help in ALV GRID Class based program.,
if u have any other related document or program using F4 function in ALV GRId please send to me for reference
Thanks & Regards
K.Ghi for what kind of fields you need to give f4.
are they std or custom...
please let me know about the fields..
try to check my logic which i gave in the below post..
it will give f4 help to the fields(if thet are standard table fieldS)
Message was edited by: Vijay Babu Dudla -
Help with adding a hyperlink to a button?
We have a simple little site we built in Catalyst and everything works great. The only problem is that we cannot figure out how to add a hyperlink to one of the buttons in the animation. We simply want to be able to click on the button and go to another site (the client's Facebook page specifically). Can anyone provide some insight? Thanks!
The message you sent requires that you verify that you
are a real live human being and not a spam source.
To complete this verification, simply reply to this message and leave
the subject line intact.
The headers of the message sent from your address are shown below:
From [email protected] Tue Nov 03 19:08:07 2009
Received: from mail.sgaur.hosted.jivesoftware.com (209.46.39.252:45105)
by host.pdgcreative.com with esmtp (Exim 4.69)
(envelope-from <[email protected]>)
id 1N5TPy-0001Sp-J1
for [email protected]; Tue, 03 Nov 2009 19:08:07 -0500
Received: from sgaurwa43p (unknown 10.137.24.44)
by mail.sgaur.hosted.jivesoftware.com (Postfix) with ESMTP id 946C5E3018D
for <[email protected]>; Tue, 3 Nov 2009 17:08:03 -0700 (MST)
Date: Tue, 03 Nov 2009 17:07:49 -0700
From: Tvoliter <[email protected]>
Reply-To: [email protected]
To: Matthew Pendergraff <[email protected]>
Message-ID: <299830586.358941257293283616.JavaMail.jive@sgaurwa43p>
Subject: Help with adding a hyperlink to a button?
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_Part_36702_1132901390.1257293269030"
Content-Disposition: inline
X-Spam-Status: No, score=-3.4
X-Spam-Score: -33
X-Spam-Bar: ---
X-Spam-Flag: NO -
I lost all my pictures! Please help:( I added all my photo to a new album from the camera roll and i delete the picture that already move to new album, at last all my picture was gone !:'( Please, anyway to recover back all my photo? please help :'( Apple Service Center or Branch can help?
Albums is a way or sorting photos. Photos aren't moved from the Camera roll. The Camera Roll consists of all the photos on the phone. If you delete from Camera Roll they are deleted everywhere but Photo Stream.
Are you using Photo Stream? Your photos, providing they wer recent should still be in Photo Stream. If you have Photo Stream set up on your computer they should all be there. -
Hi I need help on URL Connection Class
Hi
I have read the documentation but cant get it . I have to Use the getContent(); method so can any one make a program for me in which all of the methods of this class have been used?
I Also Need help on Content Handler Class Please give me one example on it but separate from the above one
Thanx alotHi
Man Some Times We need help and as of google, Google is My Best Friend. and as of forums search i know that but some time we have less time and much to work. The Time Doesnt wait us. we have to save our time. thanx for ur help and ur comments i like it. -
Need help with adding emoji to my hubby's phone don't see it when I click on the keyboard tab
I need help with adding emoji to my hubby's iPhone when I go to settings then the keyboard tab it's not there
I did that bad it's not there and doesn't give me to option to click on it
-
[svn:osmf:] 14538: Adding missing class to syndication library.
Revision: 14538
Revision: 14538
Author: [email protected]
Date: 2010-03-02 15:53:21 -0800 (Tue, 02 Mar 2010)
Log Message:
Adding missing class to syndication library.
Added Paths:
osmf/trunk/libs/Syndication/org/osmf/syndication/model/extensions/mrss/MediaRSSEmbed.asCan anyone suggest on how to add an external Jar file to an OAF project while development and also while deploying.
Thanks Kris -
Help : documentation The Robot Class
hi,
is there somone who know about the robot class either the documentation of the API, some internet web site ..
thanksWhat are you wanting to know?? I helped create the Robot class. This class was purposely kept extremely minimal, and the javadoc for it is pretty good. If you want a more complete tool, you can try Jemmy (http://jemmy.netbeans.org/), though I should warn you that the documentation there is skimpy. Jemmy builds on top of Robot and provides lots of flexibility.
- David -
Can anyone help me decompile a class file?
Can anyone pls help me decompile a class file? I've used DJ decompiler and Cavaj decompiler to decompile it but both can't seem to decompile it successfully. How do I attach the class file here? Thanks in advance!
Oh! Now I get it. So sorry I didnt intend for anybody
to do something illegal/unethical. I dont know much
about Java programming since I am very new to this
language. I didnt know anything about obfuscating
codes either. The reason why I was trying to
decompile the said class file is because I wanted to
check whether the hack program I downloaded ...That is completely contradictory.
By the way, can you tell me how I can learn Jave programming
without the aid of a book since I couldnt find one
yet.Given the eleventy bachillionty kathousand books that exist on java programming, something tells me you haven't looked too hard for one.
The best non-hard-copy source:
www.google.com -
for the moment ihave to create a program that will add accountants to contracts.
now from within contract i want to be able to be able to create a contract and then have a method to add an accountant to the contract...could u look at my contract class and c what im doing wrong please and also u can only have one accountant on each contract
im getting error....cannot find symbol Accountant(Accountant)
public class Contract
// instance variables - replace the example below with your own
private Accountant anAccountant;
//the number of days
private double duration;
private double rateOfContract;
private static final double vat= 0.21;
private boolean complete;
private String type;
private boolean occupied;
* Constructor for objects of class Contract
public Contract(double duration, String type )//Accountant anAccountant, double duration)
//this.anAccountant = anAccountant;
this.duration = duration;
rateOfContract = 0 ;
complete = false;
this.type = type;
occupied = false;
* a method to get the accountant
public Accountant getAccountant()
return anAccountant;
* a method to get the rate of the contract
public double getRateOfContract()
return rateOfContract;
* a method to check if the contract is complete
public boolean getComplete()
return complete;
* a method to set if the contract to complete
public void isComplete()
complete = true ;
* add an accountant to the contract if his expertise matches
* the type of contract
public void addAccountant(Accountant anAccountant)
if(anAccountant.getExpertise().equals(type))
if(occupied = false)
//add the accountant to the contract
anAccountant = Accountant(anAccountant);
System.out.println("an accountant has been added to the contract");
rateOfContract = anAccountant.getDailyRate() * duration;
occupied = true;
}else{
}else{
* a method to check accupied
public boolean getOccupied()
return occupied;
}Message was edited by:
mollemanyes off course i have `and i also have a controller class called firm...but i just want the accountant to be added to the contract....and i just cant do it
public class Accountant
// instance variables
protected String name;
protected String expertise;
protected double dailyRate;
protected boolean isActive;
* Constructor for objects of class Accountant
public Accountant(String name, String expertise, double dailyRate)
this.name = name;
this.expertise = expertise;
this.dailyRate = dailyRate;
isActive = false;
* a method to get the accountants name name
public String getName()
return name;
* a metohd to get the acvccontats expertise
public String getExpertise()
return expertise;
* a method to get the accountants daily rate
public double getDailyRate()
return dailyRate;
* a method to check if the accountant is active
public boolean getIsActive()
return isActive;
* a method to set the accountant to active or not
public void setIsActive(boolean active)
active = isActive;
} -
Need help with adding the following to a program
Modify the mortgage program to display the mortgage payment amount. Then, list the loan balance and interest paid for each payment over the term of the loan. The list would scroll off the screen, but use loops to display a partial list, hesitate, and then display more of the list. Do not use a graphical user interface. Insert comments in the program to document the program.
Currently I am working on adding the following line in bold but getting error expected ";" on line 27
import java.io.*;
import java.util.Date;
import java.text.DecimalFormat;
public class Mortgage5
public static void main(String[] args)
Date currentDate = new Date(); //Date constructor
DecimalFormat decimalPlaces = new DecimalFormat("$###,###.##");
//declaring variables
final double PRINCIPLE = 200000;
final double INTEREST = .0575/12;
final double TERM = 12*30;
//declaring variables
final double MONTHLY =PRINCIPLE*(INTEREST/(1-Math.pow(1+INTEREST, -TERM)));
//displaying variables
System.out.println("\t\t" + currentDate);
System.out.println("\t\tPrinciple or Loan Amount: " + decimalPlaces.format(PRINCIPLE));
System.out.println("\t\tInterest Rate: " + (INTEREST));
System.out.println("\t\tThe Term of Loan (in months): " + (TERM));
System.out.println("\t\tThe Monthly Payment is: " + decimalPlaces.format(MONTHLY));
System.out.println("\t\tThe Balence - Your Payment is: " + decimalPlaces.format(PRINCIPLE*INTEREST*TERM)-MONTHLY));
Any suggestions??? PLEASEOk I figured out the issue now if someone can help me. I need to create a loop for the following:
The list would scroll off the screen, but use loops to display a partial list, hesitate, and then display more of the list.
Here is the Program so far.
import java.io.*;
import java.util.Date;
import java.text.DecimalFormat;
public class Mortgage5
public static void main(String[] args)
Date currentDate = new Date(); //Date constructor
DecimalFormat decimalPlaces = new DecimalFormat("$###,###.##");
//declaring variables
final double PRINCIPLE = 200000;
final double INTEREST = .0575/12;
final double TERM = 12*30;
//declaring variables
final double MONTHLY =PRINCIPLE*(INTEREST/(1-Math.pow(1+INTEREST, -TERM)));
final double NEWBAL = (PRINCIPLE*INTEREST*TERM) -MONTHLY;
//displaying variables
System.out.println("\t\t" + currentDate);
System.out.println("\t\tPrinciple or Loan Amount: " + decimalPlaces.format(PRINCIPLE));
System.out.println("\t\tInterest Rate: " + (INTEREST));
System.out.println("\t\tThe Term of Loan (in months): " + (TERM));
System.out.println("\t\tThe Monthly Payment is: " + decimalPlaces.format(MONTHLY));
System.out.println("\t\tThe Balence - Your Payment is: " + decimalPlaces.format(NEWBAL));
} -
Help me get my class to add to PriorityQueue
Hi, I have a class called Edge:
class Edge <AnyType extends Comparable<? super AnyType>>
int node1;
int node2;
int weight;
public Edge(int a, int b, int w)
node1 = a;
node2 = b;
weight = w;
int getWeight()
return weight;
int compareTo(Edge b)
if (this.weight < b.weight)
return -1;
else if (this.weight == b.weight)
return 0;
else if (this.weight > b.weight)
return 1;
return 0;
}I want to add a LinkedList of Edges to a PriorityQueue using
PriorityQueue<Edge> pq = new PriorityQueue<Edge>( getEdges( ) );The getEdges() method returns a LinkedList of Edges. The error I get is ClassCastException: Edge (in java.util.PriorityQueue).
Any Ideas? Thanks for any help!Not me :(
I think the problem may be with my class' header:class Edge <AnyType extends Comparable><? super AnyType>>Are you sure that something with that header should be able to be added to a PiorityQueue?
Maybe you are looking for
-
When viewing a pdf document how do I change the default or pre-set magnification?
Anytime I am directed to a pdf document by a website it opens the pdf file at 173% magnification. It tells you to open the menu to change the pre-set magnification, but I don't see a menu to open.
-
Update/save record on a single page?
Hi all. I've got a form with read-only fields displaying database data in a repeat region. If I click the Edit button at the end of each line, the 3 fields post to update.php where I can edit the data. The Save button on this page updates the databas
-
On larger pages with several tooltips on classes, the page takes a long time to finish all of the javascript initialization. This turns out to be caused by the time it takes spry to search the DOM for objects with matching class names. I patched my c
-
Upgrade content db (OCS) 10.1.2.4 to 10.2
Hi, For the upgrade I guess a new content database is created, but can I not upgrade the existend content db from OCS to the content db 10.2? So I keep the data in it? I wanted to install contentdb 10.2 but fails because ocs 10.1.2 is in the database
-
Lumia 620 - Unable to connect to Facebook over Wif...
Lumia 620 is able to connect to my router (Netgear 3700) and able to access windows store, configure and download e-mails, browse web sites. But not able to connect to facebook with "people hub" or Facebook app. Similarly Youtube also does not connec