Why won't this work even though it does on another page?
Hi,
I am using XML to populate dynamic data. The Editor/Back-End
will load the data no problem. When update is clicked the info is
sent to a PHP script and the new xml is written to the file.
However, on the front-end, main page, I use the same code, and it
only loads a small bit, so I will only see the first text line or
top of the picture, I can't seem to find out why..
how can I bind the xmllistcollection value to the text value
of a text field or source of an image.
my xml structure is like this...
<about>
<image>images/image.jpg</image>
<top>html text goes here with CDATA
wrapper</top>
<bottom>more html text goes here with CDATA
wrapper</bottom>
</about>
i know how to bind the xmllistcollection to a dataprovider or
list, but i don't understand how i can use it outside of components
that use dataproviders.
thanks,
jesse
Similar Messages
-
I'm trying to put these functions into a Loop to conserve
space. Why won't this work?
.Yeah, sly one is right. You can not have the "i" inside the
onRollOver function, what you have to do is: As the movieClip class
is dynamic you can create a property of the movieClip which stores
the value if the "i". And then, inside the onRollOver function, you
have to make reference to that property.
for (i=0; i<2; i++) {
this.regArray
.iterator = i;
this.regArray.onRollOver = function () {
showRegion(regArray[this.iterator]);
this.regArray
.onRollOut = function () {
hideRegion(regArray[this.iterator]); -
Consolidate Library - why won't this work?
Hi there,
I've been using iTunes and my iPod on several iMacs successfully for years - I've just changed to a PC and now I feel like a beginner!
I can't seem to get iTunes for Windows to seek out all my MP3s and put them in iTunes. The only way I can get iTunes to put them in it's library is to play them - then iTunes recognises then and remebers them. I have tried clicking on consolidate library - nothing. I have tried downloading my new music directly into the iTunes music folder - nothing. I can maunally add the file I download music into, but I don't want to have to do that all the time.
Why won't iTunes just find my music for me? It does on my iMac!I dont know!
In what way is it not working? -
CSV Files from Oracle - why won't this work?
Hi all, I copied and pasted in the code at the bottom of this post
into Oracle 8 - it's copied from asktom so it should be fine.
I got Function created at the end.
However, when I try to run
exec dump_csv( 'SELECT Defer_Date, Defer_Time, User_Id, Start_Date, Group_Name,Employee_Id, PROCESS_STATUS, REQUEST_PARAMSX1 FROM msf080 ORDER BY Defer_Date DESC;',',','/ellipse/el5.2.3.2_tb_sup/work','billy.txt');
I get
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00221: 'DUMP_CSV' is not a procedure or is undefined
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
The same thing happens when I remove the exec from the beginning of the
command.
I know it's probably something stupid that I have neglected. Any help
appreciated. Also, being able to escape single quotes would be nice,
as in WHERE Prog_Name = 'MyString' - is it
WHERE Prog_Name = '''MyString''' - i.e. triple-single quote?
Paul...
create or replace function dump_csv( p_query in varchar2,
p_separator in varchar2 default ',',
p_dir in varchar2 ,
p_filename in varchar2 )
return number
is
l_output utl_file.file_type;
l_theCursor integer default dbms_sql.open_cursor;
l_columnValue varchar2(2000);
l_status integer;
l_colCnt number default 0;
l_separator varchar2(10) default '';
l_cnt number default 0;
begin
l_output := utl_file.fopen( p_dir, p_filename, 'w' );
dbms_sql.parse( l_theCursor, p_query, dbms_sql.native );
for i in 1 .. 255 loop
begin
dbms_sql.define_column( l_theCursor, i, l_columnValue, 2000 );
l_colCnt := i;
exception
when others then
if ( sqlcode = -1007 ) then exit;
else
raise;
end if;
end;
end loop;
dbms_sql.define_column( l_theCursor, 1, l_columnValue, 2000 );
l_status := dbms_sql.execute(l_theCursor);
loop
exit when ( dbms_sql.fetch_rows(l_theCursor) <= 0 );
l_separator := '';
for i in 1 .. l_colCnt loop
dbms_sql.column_value( l_theCursor, i, l_columnValue );
utl_file.put( l_output, l_separator || l_columnValue );
l_separator := p_separator;
end loop;
utl_file.new_line( l_output );
l_cnt := l_cnt+1;
end loop;
dbms_sql.close_cursor(l_theCursor);
utl_file.fclose( l_output );
return l_cnt;
end dump_csv;
/mkdir admin - permission denied. I guess that's the end of that so?I'm afraid so...
Shouldn't that be /usr/oracle/admin/m52ora/ - i.e. without the utl_file at the end?No, from your posts it's part of the path.
...but there could be another way. Not sure if it works on your version (it surely works on 9i onwards), I don't have your version on hands to do tests, so you'll do the test :-)
As sysdba create a directory object, say MYDIR (you can name it as you want) :
SQL> create or replace directory mydir as '/ellipse/el5.2.3.2_tb_sup/work'; -- here you can use any OS directory on which you have write access.
SQL> grant read,write on directory mydir to <your user>;
then, as your user
select dump_csv( 'SELECT Defer_Date, Defer_Time, User_Id, Start_Date, Group_Name,Employee_Id, PROCESS_STATUS, REQUEST_PARAMSX1 FROM msf080 ORDER BY Defer_Date DESC;',',','MYDIR','billy.txt')
from dual;
here MYDIR must be uppercase.
Good luck... -
5.5G battery in my 5G iPod. Why won't this work?
I bought a 5G 30GB iPod around christmas 05. Recently, the HD failed after i dropped it.
Fortunately, my girlfriend had a 5.5G 80GB with a broken screen that she was using for back ups.
She gave me the iPod so that i could maybe use her HD in my iPod. I cracked them open and used the Screen, scroll wheel, motherboard from my 5G 30gb, and the HD and battery from her 5.5G 80gb.
After i put the two back together here is what happened:
I started up the iPod and the apple logo appeared. Shortly after, a screen saying "Connect to your Computer. Use iTunes to Restore." in about 5 different languages.
I connected it to my computer, then a message in iTunes showed up saying "iTunes has detected an iPod in recovery mode. You must restore this iPod before it can be used with iTunes."
I then clicked Restore and entered in my Administrator name and password.
Shortly after that, an alert popped up saying "The iPod "iPod" could not be restored. An unknown error occurred (1416)."
This is where I'm stuck. I'm hopping that there are some people on this forum much smarter than i am and who are also willing to help me out.
Let me know if i can describe anything further to give people more information about my problem.
Thanks to anyone who can help!!!OK, I got the cfdump to display all the form variables, and my submit button, btnSubmit is there. But I think that is also the problem.
In my original action page, I did not have to check for the existence of the submit button, so the codes below worked :
<cfif ListFirst(i,"/") is "comments">
<cfset select_urdn_number = listgetat(i, 2, "/")>
<cfset select_urdn_line_item = listlast(i, "/")>
<cfset combineEnd = select_urdn_number & "/" & select_urdn_line_item>
<cfif StructKeyExists(form, "del/" & combineEnd) and form["del/" & combineEnd] is "Yes">
Now when I submit the form to itself, I have to check for the existence of the submit button and that gives me an extra form variable, so
<cfif ListFirst(i,"/") is "comments"> will fail since it is no loner the first variable.
So instead of performing listfirst, how can I find the comments in the form variables, so that I can continue to perform the other steps after ListFirst,
to get all the information that I want ? I need it broken up like the above in order for the form to process correctly. -
I want to creat a copy of my playlists onto a Pages page. I selected all the entries in the playlist, then did Edit > Copy > Edit > Paste. I've done this lots of times before and it was fine; now when I paste all I get is a series of Speaker symbols, no text with of the playlist songs. Does anyone else have this problem? Thanks.
I want to creat a copy of my playlists onto a Pages page. I selected all the entries in the playlist, then did Edit > Copy > Edit > Paste. I've done this lots of times before and it was fine; now when I paste all I get is a series of Speaker symbols, no text with of the playlist songs. Does anyone else have this problem? Thanks.
-
RAM issues WHY WON'T THIS WORK??!!
I bought 1 additional 2Gb stick of RAM for my MacBook Pro 2.16, all information given on Mac website, documentation etc states that this MAC is capable of handling up to 3Gb RAM. But when the new RAM is install it will not boot. I have tried everything I can think of, ensuring that both of the memory slots are good, I have installed the original RAM in the second port, the system boots fine, I have installed the new 2Gb of RAM in the original port, system boots fine, installed the new 2Gb stick in the secondary port, system boots fine, but together nothing. I am sure that the RAM is correct - 2Gig - SO-DIMM DDR2 SDRAM 667Mhz.... Not to mention the system boots fine without the original 1Gb RAM, but honestly I didn't spend the money to have only 2Gb RAM !!
Has anyone any ideas ??
Message was edited by: AW1979Hi AW1979: In doing a little checking, I see that there are 2 versions of the 2.16gHz 17" MacBook Pro. The earlier version is capable of supporting only 2gB of RAM. The second version can support 3gB. Is it possible that yours is the version from Spring/Summer of 2006?
Stedman -
Can't update ADOBE after many attempts. Why won't it work?
Keep getting messages saying I must update ADOBE. Keep following directions for update. Then I'm disallowed access to anything that requires ADOBE update and a red typed message appears again saying I need to update ADOBE. Why won't this work ? I am a senior citizen and am not a computer savvy user. Need help with this ongoing problem.
fiddle4deeHello fiddle4dee, probably you mean adobe flash player, the latest flash version for your Intel Mac OS X 10.6 today is the 16.0.0.296. If you have a previous version then uninstall it with the :
* http://helpx.adobe.com/flash-player/kb/uninstall-flash-player-mac-os.html
after that you can install the latest from the next link :
* http://www.adobe.com/special/products/flashplayer/fp_distribution3.html
find Operating System, Mac OS X (Intel) > All supported browsers > All supported languages > '''Download DMG Installer'''
thank you -
Thank you for approving my feed iTunes . The only problem is, there is no art work, even though artwork was submitted correct sizes and formats were used. Why is this and how can the problem be rectified?
Thanks for getting back. Hadn't got round to re uploading the amended feed. I just did it now.
The only thing is, Feed Validator doesn't like it because of the picture size, and a couple of other things, it reeds the following:
Sorry
This feed does not validate.
line 22, column 14: width must be between 1 and 144: 1400 [help] <width>1400</width>
^
line 23, column 15: height must be between 1 and 400: 1400 [help] <height>1400</height>
^
line 25, column 21: XML parsing error: <unknown>:25:21: not well-formed (invalid token) [help]
<itunes:image href=http://www.whiteberg.com/Wdotfontitunes2.png" />
^
In addition, interoperability with the widest range of feed readers could be improved by implementing the following recommendations.
Your feed appears to be encoded as "utf-8", but your server is reporting "US-ASCII" [help]
line 4, column 114: Self reference doesn't match document location [help]... dcast.xml" type="application/rss+xml" />
^ -
This morning, my macbook pro laptop won't turn on even though the battery is charged and power cord is working. it worked fine last night. what can i do?
Try the suggestions in this support article:
http://support.apple.com/kb/TS1367
Ciao. -
I have made a website using iweb, as this will no longer be supported by apple, does that mean the gallery I have created on my website will no longer work even though I am hosting it with a different hosting provider. Will the other widgets no longer work?
There are a few things that won't work on other hosting sites; hit counters and pop-up slide shows for sure.
See http://oldtoadstutorials.net/No.iW11.html for more info, and/or the iWeb forum at https://discussions.apple.com/community/ilife/iweb -
The genius bar sold me a LaCie 500 GB EHD today but I can't get it to work properly. Can I schedule another genius bar appt. to help me with this issue even though the EHD is not an Apple product?
Yes, if you purchased it in an Apple store, they should be able to assist you. Bring your MBP with you as well as the Drive.
Ciao. -
I just used stellar phoenix mac data recovery and it seemed to work but now my files won't open. Even though they are "jpeg, mov" files, the error message is "could not be opened". The movie's file format isn't recognized. " Any help or are they corrupted?
Sounds to me like the file is probably corrupt. If you had hard drive corruption or damage, that could easily result in recovered files not being fully intact. If you were trying to recover accidentally deleted files, it's possible they might have been partially overwritten before recovering. There are never any guarantees with file recovery.
Without more information on the circumstances that led you to try recovery, it's hard to give advice on what to try from here. You could always try another file recovery tool, like Data Rescue 3. Just be sure you're taking appropriate precautions when doing recovery. See Recovering deleted files. -
I am trying to open pptx files on my MacBook Pro and continue to get "No Text Converter is installed for this application" even though I have dowloaded several converters that were supposed to work and I just downloaded Apache Open Office 3.4.1 with no luck. I am able to open docx files with the converters I have installed but not pptx files.
The PPTX file type is primarily associated with 'Power Point' by Microsoft Corporation.
This is the new format for Microsoft Office documents.
It is a combination of XML architecture and ZIP compression for size reduction.
To open Office 2008 for Mac documents (format .xlsx, .docx, .pptx) in Office for Mac 2004, you must download and install the Open XML File Format Converter. This article describes how to obtain and install the Open XML File Format Converter for Mac.
more here:
http://support.microsoft.com/kb/968200
Instead of all that, and buying OfficeMac etc...
Try to see if the FREE LibreOffice suite will open the file on your Mac.
http://www.libreoffice.org/ -
Why won't this code work?
All I want to do is resize the select panel to the same size as east panel. Why won't it work?
Space.java_____________________________________________
import javax.sound.sampled.*;
import java.awt.*;
import javax.sound.midi.*;
import javax.swing.*;
import java.util.*;
import java.awt.event.*;
import java.io.*;
public class Space extends JFrame implements ActionListener, Runnable{
//Sound
Sequence currentSound;
Sequencer player;
Thread soundCheck;
boolean check = true;
public void start(){
soundCheck = new Thread();
soundCheck.start();
public void run(){
try{
File bgsound = new File("Sounds" + File.separator + "Space.mid");
currentSound = MidiSystem.getSequence(bgsound);
player = MidiSystem.getSequencer();
player.open();
player.setSequence(currentSound);
player.start();
checkSound();
} catch (Exception exc){}
public void checkSound(){
while(check){
if(!player.isRunning()){
run();
try{
soundCheck.sleep((player.getMicrosecondLength() / 1000)-player.getMicrosecondPosition()); // sleep for the length of the track
}catch (InterruptedException IE){}
//Screen Variables:
Dimension SCREEN = Toolkit.getDefaultToolkit().getScreenSize();
final int SCREENWIDTH = SCREEN.width;
final int SCREENHEIGHT = SCREEN.height;
//Panels:
JPanel select, main, north, south, east;
//Buttons:
JButton instructB, cheatB, playB, exit, about;
//Labels:
JLabel open, cheat1, cheat2, cheatInstruct, i1, i2 , i3, aboutLabel;
//The container and frame:
static Space jframe;
Container content;
//The Constructor:
public Space(){
super("Space");
//set container attributes:
content = getContentPane();
content.setLayout(new BorderLayout());
//init panels:
main = new JPanel();
select = new JPanel();
north = new JPanel();
east = new JPanel();
south = new JPanel();
//set panel attributes:
select.setLayout(new GridLayout(3,0,10,10));
select.setBackground(Color.black);
main.setBackground(Color.black);
north.setBackground(Color.black);
//add panels:
content.add("West", select);
content.add("Center", main);
content.add("North", north);
content.add("East", east);
//Image Icons:
Icon exit1 = new ImageIcon("Images" + File.separator + "exit1.gif");
Icon exit2 = new ImageIcon("Images" + File.separator + "exit2.gif");
Icon about1 = new ImageIcon("Images" + File.separator + "about1.gif");
Icon about2 = new ImageIcon("Images" + File.separator + "about2.gif");
//init buttons, add their listeners, and set their attributes:
instructB = new JButton("Instructions", new ImageIcon("Images" + File.separator + "ship.gif"));
instructB.setContentAreaFilled(false);
instructB.setForeground(Color.yellow);
instructB.addActionListener(this);
select.add(instructB);
cheatB = new JButton("Cheats", new ImageIcon("Images" + File.separator + "cheat.gif"));
cheatB.setContentAreaFilled(false);
cheatB.setForeground(Color.yellow);
cheatB.addActionListener(this);
select.add(cheatB);
playB = new JButton("Play", new ImageIcon("Images" + File.separator + "ship2.gif"));
playB.setContentAreaFilled(false);
playB.setForeground(Color.yellow);
playB.addActionListener(this);
select.add(playB);
exit = new JButton();
exit.setRolloverEnabled(true);
exit.setIcon(exit1);
exit.setRolloverIcon(exit2);
exit.setBorderPainted(false);
exit.setContentAreaFilled(false);
exit.addActionListener(this);
north.add(exit);
about = new JButton();
about.setRolloverEnabled(true);
about.setIcon(about1);
about.setRolloverIcon(about2);
about.setBorderPainted(false);
about.setContentAreaFilled(false);
about.addActionListener(this);
north.add(about);
//Labels:
open = new JLabel("", new ImageIcon("Images" + File.separator + "open.gif"), JLabel.CENTER);
main.add(open);
cheat1 = new JLabel("<html><h1>tport</h1></html>");
cheat1.setForeground(Color.red);
cheat2 = new JLabel("<html><h1>zap</h1></html>");
cheat2.setForeground(Color.green);
cheatInstruct = new JLabel("<html><h1>Type a cheat at any time during a game, and press the \"Enter\" key.</html></h1>");
cheatInstruct.setForeground(Color.blue);
i1 = new JLabel("<html><h1>The arrow keys move your ship.</h1></html>");
i1.setForeground(Color.red);
i2 = new JLabel("<html><h1>The space-bar fires the gun.</h1></html>");
i2.setForeground(Color.green);
i3 = new JLabel("<html><h1>The red circles give upgrades.</html></h1>");
i3.setForeground(Color.blue);
aboutLabel = new JLabel("", new ImageIcon("Images" + File.separator + "aboutImage.gif"), JLabel.CENTER);
//centerPanel();
private void centerPanel(final int width, final int height){
try{
Runnable setPanelSize = new Runnable(){
public void run(){
east.setPreferredSize(new Dimension(width, height));
SwingUtilities.invokeAndWait(setPanelSize);
} catch (Exception e){}
public void actionPerformed(ActionEvent e){
//if the play button was pressed do:
if(e.getSource() == playB){
//do something
//else if the cheat button was pressed do:
else if(e.getSource() == cheatB){
//remove and add components
main.removeAll();
main.setLayout(new GridLayout(3,0,0,0));
main.add(cheat1);
main.add(cheat2);
main.add(cheatInstruct);
main.repaint();
main.validate();
else if(e.getSource() == instructB){
//remove and add components
main.removeAll();
main.setLayout(new GridLayout(3,0,0,0));
main.add(i1);
main.add(i2);
main.add(i3);
main.repaint();
main.validate();
else if(e.getSource() == exit){
jframe.setVisible(false);
showCredits();
else if(e.getSource() == about){
main.removeAll();
main.setLayout(new FlowLayout());
main.add(aboutLabel);
main.repaint();
main.validate();
public void showCredits(){
try{
String[] args = {};
Credits.main(args);
}catch (Exception e){}
public static void main(String args[]){
jframe = new Space();
jframe.setUndecorated(true);
jframe.setBounds(0, 0, jframe.SCREENWIDTH, jframe.SCREENHEIGHT);
jframe.setVisible(true);
jframe.show();
jframe.setResizable(false);
jframe.setDefaultCloseOperation(EXIT_ON_CLOSE);
jframe.centerPanel(jframe.select.getWidth(), jframe.select.getHeight());
jframe.run(); //start music
}The reason it wasn't working was because you were calling the method after you had set the frame visible, so you saw no change. On top of that, jframe.select.getWidth() only works after the frame is visible in this case. So it's best to set a fixed size for one of them, then use getWidth, or as I did... it's the same thing. I also changed the centerPanel method, I'm not sure if all that's exactly needed, but you can change it back if you think you'll need it.
import javax.sound.sampled.*;
import java.awt.*;
import javax.sound.midi.*;
import javax.swing.*;
import java.util.*;
import java.awt.event.*;
import java.io.*;
public class Space extends JFrame implements ActionListener, Runnable{
//Sound
Sequence currentSound;
Sequencer player;
Thread soundCheck;
boolean check = true;
public void start(){
soundCheck = new Thread();
soundCheck.start();
public void run(){
try{
File bgsound = new File("Sounds" + File.separator + "Space.mid");
currentSound = MidiSystem.getSequence(bgsound);
player = MidiSystem.getSequencer();
player.open();
player.setSequence(currentSound);
player.start();
checkSound();
} catch (Exception exc){}
public void checkSound(){
while(check){
if(!player.isRunning()){
run();
try{
soundCheck.sleep((player.getMicrosecondLength() / 1000)-player.getMicrosecondPosition()); // sleep for the length of the track
}catch (InterruptedException IE){}
//Screen Variables:
Dimension SCREEN = Toolkit.getDefaultToolkit().getScreenSize();
final int SCREENWIDTH = SCREEN.width;
final int SCREENHEIGHT = SCREEN.height;
//Panels:
JPanel select, main, north, south, east;
//Buttons:
JButton instructB, cheatB, playB, exit, about;
//Labels:
JLabel open, cheat1, cheat2, cheatInstruct, i1, i2 , i3, aboutLabel;
//The container and frame:
static Space jframe;
Container content;
//The Constructor:
public Space(){
super("Space");
//set container attributes:
content = getContentPane();
content.setLayout(new BorderLayout());
//init panels:
main = new JPanel();
select = new JPanel();
north = new JPanel();
east = new JPanel();
south = new JPanel();
//set panel attributes:
select.setLayout(new GridLayout(3,0,10,10));
select.setBackground(Color.black);
main.setBackground(Color.black);
north.setBackground(Color.black);
//add panels:
content.add("West", select);
content.add("Center", main);
content.add("North", north);
content.add("East", east);
//Image Icons:
Icon exit1 = new ImageIcon("Images" + File.separator + "exit1.gif");
Icon exit2 = new ImageIcon("Images" + File.separator + "exit2.gif");
Icon about1 = new ImageIcon("Images" + File.separator + "about1.gif");
Icon about2 = new ImageIcon("Images" + File.separator + "about2.gif");
//init buttons, add their listeners, and set their attributes:
instructB = new JButton("Instructions", new ImageIcon("Images" + File.separator + "ship.gif"));
instructB.setContentAreaFilled(false);
instructB.setForeground(Color.yellow);
instructB.addActionListener(this);
select.add(instructB);
cheatB = new JButton("Cheats", new ImageIcon("Images" + File.separator + "cheat.gif"));
cheatB.setContentAreaFilled(false);
cheatB.setForeground(Color.yellow);
cheatB.addActionListener(this);
select.add(cheatB);
playB = new JButton("Play", new ImageIcon("Images" + File.separator + "ship2.gif"));
playB.setContentAreaFilled(false);
playB.setForeground(Color.yellow);
playB.addActionListener(this);
select.add(playB);
exit = new JButton();
exit.setRolloverEnabled(true);
exit.setIcon(exit1);
exit.setRolloverIcon(exit2);
exit.setBorderPainted(false);
exit.setContentAreaFilled(false);
exit.addActionListener(this);
north.add(exit);
about = new JButton();
about.setRolloverEnabled(true);
about.setIcon(about1);
about.setRolloverIcon(about2);
about.setBorderPainted(false);
about.setContentAreaFilled(false);
about.addActionListener(this);
north.add(about);
//Labels:
open = new JLabel("", new ImageIcon("Images" + File.separator + "open.gif"), JLabel.CENTER);
main.add(open);
cheat1 = new JLabel("<html><h1>tport</h1></html>");
cheat1.setForeground(Color.red);
cheat2 = new JLabel("<html><h1>zap</h1></html>");
cheat2.setForeground(Color.green);
cheatInstruct = new JLabel("<html><h1>Type a cheat at any time during a game, and press the \"Enter\" key.</html></h1>");
cheatInstruct.setForeground(Color.blue);
i1 = new JLabel("<html><h1>The arrow keys move your ship.</h1></html>");
i1.setForeground(Color.red);
i2 = new JLabel("<html><h1>The space-bar fires the gun.</h1></html>");
i2.setForeground(Color.green);
i3 = new JLabel("<html><h1>The red circles give upgrades.</html></h1>");
i3.setForeground(Color.blue);
aboutLabel = new JLabel("", new ImageIcon("Images" + File.separator + "aboutImage.gif"), JLabel.CENTER);
east.setPreferredSize(new Dimension(125, SCREEN.width));
//centerPanel();
/*private void centerPanel(final int width, final int height){
try{
Runnable setPanelSize = new Runnable(){
public void run(){
east.setPreferredSize(new Dimension(width, height));
SwingUtilities.invokeAndWait(setPanelSize);
} catch (Exception e){}
private void centerPanel(final int width, final int height)
east.setPreferredSize(new Dimension(width, height));
public void actionPerformed(ActionEvent e){
//if the play button was pressed do:
if(e.getSource() == playB){
//do something
//else if the cheat button was pressed do:
else if(e.getSource() == cheatB){
//remove and add components
main.removeAll();
main.setLayout(new GridLayout(3,0,0,0));
main.add(cheat1);
main.add(cheat2);
main.add(cheatInstruct);
main.repaint();
main.validate();
else if(e.getSource() == instructB){
//remove and add components
main.removeAll();
main.setLayout(new GridLayout(3,0,0,0));
main.add(i1);
main.add(i2);
main.add(i3);
main.repaint();
main.validate();
else if(e.getSource() == exit){
jframe.setVisible(false);
//showCredits();
else if(e.getSource() == about){
main.removeAll();
main.setLayout(new FlowLayout());
main.add(aboutLabel);
main.repaint();
main.validate();
/*public void showCredits(){
try{
String[] args = {};
Credits.main(args);
}catch (Exception e){}
public static void main(String args[]){
jframe = new Space();
//jframe.centerPanel(500, jframe.select.getHeight());
jframe.setUndecorated(true);
jframe.setBounds(0, 0, jframe.SCREENWIDTH, jframe.SCREENHEIGHT);
jframe.setVisible(true);
jframe.show();
jframe.setResizable(false);
jframe.setDefaultCloseOperation(EXIT_ON_CLOSE);
//jframe.centerPanel(jframe.select.getWidth(), jframe.select.getHeight());
jframe.run(); //start music
}Sorry I lost all the indenting :) I guess you can take a look at the few lines I changed and copy those lines.
Maybe you are looking for
-
How to create a SWC file in flex
Can any one help me giving step by step information of how to create .swc file in flex..Iam a starter to this...Pls reply
-
I have created a Library file but do not know how to connect it to the files I want it to update. I have tried placing in and it changes the CSS or adjacent CSS.
-
How to connect the speackers for the CT4830
Hello. I can't find how to plug the subwoofer to the card.
-
Premiere Pro CC Source and Program Playback Controls not working.. help please.
Hi, Need your help to find out why none of the Premiere Pro CC Source and Program Playback Controls are working.. I can do playback using spacebar, but not clicking on the controls... same goes the rest. Thank you, Mauro
-
I've Lost My Original Mac OS X v. 10.4 Disks - But Need To Reinstall --
Greetings, I have misplaced my original OS X (Tiger 10.4) install disks that came with my Power Mac G5. Now I'm having a "kernel panic" where this gray window pops up and freezes the computer, and asks me to restart by pressing the power button. I've