Move Label From Down To Top The Frame?
greetings all
i want to make something like movie credits
i have an empy frame and i have some labels
and i want when the frame runs labels move in turn from down to top
any ideas,how to do that?
thanks in advance
thanks Encephalopathic for the help
but i have just two questions about your code:
i don't understand what's DELTA_Y and what's it's function here:
if (y > 0)
y -= DELTA_Y;
}and i have added another label and set it to be shown after the first label
but what happens is the opposite,i don't know why?
here's what i did:
import javax.swing.*;
import java.awt.*;
import javax.swing.Timer;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class test_timer
private static final int Y_MAX = 300;
protected static final int X_POS = 10;
protected static final int DELTA_Y = 2;
private static final int DELAY_TIME = 100;
private static int y = Y_MAX;
private static JPanel panel;
public static void main(String[] args)
JFrame frame = new JFrame("Credits");
final JLabel label = new JLabel("Updating Component Test", JLabel.CENTER);
final JLabel label2 = new JLabel("Statement Two", JLabel.CENTER);
label.setFont(new Font("Courier New", Font.BOLD, 15));
label.setSize(label.getPreferredSize());
label.setLocation(X_POS, y);
label.setForeground(Color.WHITE);
label2.setFont(new Font("Courier New", Font.BOLD, 15));
label2.setSize(label2.getPreferredSize());
//i set the label2 to be down label1
label2.setLocation(X_POS, y+25);
label2.setForeground(Color.WHITE);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
panel = new JPanel();
panel.setPreferredSize(new Dimension(2*Y_MAX, Y_MAX));
panel.setLayout(null);
panel.setBackground(Color.BLACK);
panel.add(label);
//i added label2 after label1
panel.add(label2);
frame.add(panel);
frame.pack();
frame.setLocationRelativeTo(null);
frame.setVisible(true);
new Timer(DELAY_TIME, new ActionListener()
public void actionPerformed(ActionEvent ae)
if (y > 0)
y -= DELTA_Y;
label.setLocation(X_POS, y);
//set the new location to be less than label1 location
label2.setLocation(X_POS,y-40);
}).start();
}
Similar Messages
-
My movie didn't down load all the way until 2 pm. I need to finish watching it. It's only 11 am. It is gone.
It's a known issue and has been discussed numerous times. If you need quick access, you can get beautiful silent from the market for free which will allow you have a widget on your homescreen for silent mode.
-
How can I move apps from one computer to the other?
How can I move apps from one computer to the other?
(preferably without iCloud)Backup your iTunes library to an external drive and onto the other computer
http://support.apple.com/kb/ht1751 -
How to move apps from one screen to the next?
In order to organize a bit the screens after installing several apps, how can we move them from one screen to the next?
I've found it possible to place them in the lower bar and then replace them into the required screen but that's very slow...
Any other way?
Also, is it possible to place the apps where we want and not get them automatically reorganized (blanks filled)?
Thanks,Sorry I guess the correct terminology would be 'virtual desktops'.
You pass from one virtual desktop to another swiping left or right on the phone.
I would like to switch conveniently an app (icon) from one virtual desktop to another. -
How do I move photos from my PC to the I Pad?
How do I move photos from my PC to the I Pad so I can use I Photo?
You sync from PC to iPad using iTune
http://i1224.photobucket.com/albums/ee374/Diavonex/Album%204/58cd8f694a93ea5cd55 def748e732d5a.jpg -
Hi, I need help!. I will change my iphone and I need to move contacts from one iPhone to the new, what should I do?
You should have been syncing your contact with your computer all along. Just sync them from the computer to the new iphone.
iPhone: Transferring information from your current iPhone to a new iPhone -
How do i move music from my iphone to the icloud?
how do i move music from my iphone to the icloud?
Please explain.
Icloud is a service that allows you to redownload most itunes purchases. -
How do I move data from my iPad to the cloud?
How do I move data from my iPad to the cloud?
lrc70 wrote:
My old PC finally died
Backup, backup, backup...
Now I am trying to get all 733 songs into my Itunes library and on my macbook
which you will promply backup, backup, backup, yes?
And make and maintain regular backups?
Time Machine is simply to use. Just plug in an external drive. -
Quicktime movie export from Flash CS3 is skipping frame.
When I try to export Quicktime movie from Flash CS3, the
resulting mov file is skipping frames. i.e.: The movie is showing
frame number 1, 2, 3, 4, 5, 6, 7, 7, 7, 10, 11, 12, 12, 12, 15
etc...
As you can see the frame number 7 is repeated 3 times and
frame 8 and 9 are nowhere to be found.
The last configuration I used is 960x540, Sorenson video 3
medium quality, 25 fps, keyframe every 25 frames. 6400 kbits/s.
I tried various configurations,with different codecs and even
with keyframe all frames and I always get simillar problems.
Anyone have an idea what is going on, and how to fix this?
Thank you,
Olivier.The QT exporter in Flash is honestly my least favorite
feature - not the feature itself but how it
works (or how it doesn't work in some cases). For me it is
almost unusable unless you have a very
short timeline, small stage, lower frame rate - like AS
generated effects or something - otherwise,
for true frame accuracy to video output - it is not reliable
enough and not fast enough for any real
world production environment.
So typically for me - I love SWF2Video (www.flashants.com) as
it takes any SWF and makes it into an
AVI that is frame accurate no matter what the frame rate is -
quite incredible - enough so that I
always felt it should have been bundled with Flash (as well
as Wacom tablets).
Harmony is an incredible product - as is SOLO and TBS (Toon
Boom mStudio) - each of those programs
are dedicated animation programs designed for output to video
- Flash has a lot of hats to fill and
it was never really designed for animation to video even
though many of us have found it suitable
for all intents and purposes as an animation program for full
production.
But all in all - the quicktime exporter doesn't really
deliver how we would expect it too I am sorry
to say - I only hope it works as well as it does on the Mac
(Mac users could always choose to export
to Quicktime Video but not PC users).
For now if I am exporting to video I keep it all on the
timeline or nested in Graphic symbols or use
the SWF2Video tool.
hope this helps.
-chris
Chris Georgenes / mudbubble.com / keyframer.com / Adobe
Community Expert
OBastien wrote:
> Thank you for your reply Chris.
>
> I tried different possible solutions you listed but it's
not working.
> Disabling sound had no effects. Changing the FPS is not
an option, it has to be
> 25 FPS. I lowered the resolution to 300 something, it
seemed to be a little bit
> better, but it still dropped some frame, and the image
quality was horrible.
>
> I think it is really sad that we have to try different
settings in the hope
> that flash will grab all the frames. I'm really
disapointed in Adobe. I'm
> pretty sure it is the fault of Adobe and not Apple,
because I don't have does
> problems with Quicktime in ToonBoom Harmony. What is
strange is when I do an
> AVI export I never noticed a dropped frame. I'm not
using AVI video right now
> because I can not find a codec that gives me small size,
fast encoding times,
> the ability to seek in the movie by dragging the
timeline progress bar, and the
> possibility to edit in After Effects. If you know an AVI
codec that does all
> that it would be really great news.
>
> Thank you again,
> Olivier.
> -
The problem started when I downloaded the Firefox Beta version 4. I have just upgraded to version 5 and I am still having the problem. I have a center button on mouse pad that allows me to move up and down pages without clicking on the sidebar,
Try this: <br />
Type '''about:config''' in the URL bar and hit Enter. <br />
''If you see the warning, you can confirm that you want to access that page.''
'''''Filter''''' = '''trackpoint'''<br />
'''''Pref''''' = '''ui.trackpoint_hack.enabled''' <br />change that from -1 to 1. <br />Restart Firefox. -
How can i move icons from one screen to the other?
How do i move icons from one page to another?
Tap and hold any icon for a couple of seconds. They'll all start to wobble. Tap and drag the one you want to move to the side of the screen and the next screen will appear; drop the icon on whatever screen you want it on.
You can also do it quicker in iTunes - connect the phone and click the Apps tab in the main window. You'll see a picture of your phone with the apps laid out. Just click and drag -
How can I move photos from other albums into the camera roll
I have synced photos from my computer onto the iPad. There placed in a different album. How can I move them into the camera roll?
You could do it by setting up a Shared Photo Stream. Select the photos in the Photo app then tap the Shared button selecting Photo Stream. Just don't enter any email address and it will appear on your other devices. Only photos can be added and not albums so you will have to re-organize then on the iPhone.
I would recommend getting the photos to the computer as well though. Create a photo library on the computer and sync then over to the iphone with iTunes. The photo library on the computer can be added to a more reliable backup. -
How to hide the label and choice component in the frames
I have two Buttons.
when i press the button i want disappear the label and Choice list from the panel. when i press Other button i want to appear the label and Choice list in the panel
plz give the good idea for it.one of the ways is to use a CardLayout
1st card has the label and list, 2nd card is a blank panel
click the button to show the 1st card, then click again for 2nd card,
then again for 1st card etc -
Having problem loading the gif from a jar for the frame.
I got the gif showing up for the Toolbar fine but now trying to get the Frame icon from the same jar and having the problem.
I have the following method in the MainFrame.
* Load an ImageIcon, either from inside the jar file (during the normal execution)
* or from the source path (during the development without jar file).
public static synchronized ImageIcon LoadImageIcon(String name) {
try {
URL url = ClassLoader.getSystemResource(name);
if(url!=null) {
return new ImageIcon(Toolkit.getDefaultToolkit().getImage(url));
} else {
return new ImageIcon(name);
} catch(Exception e) {
return null;
I gave the following in the constructor of the same class i.e the MainFrame which is extending the JFrame
this.setIconImage(LoadImageIcon("frameicon.gif").getImage());
I am not getting the Icon. I did check the name of icon and I don't know what else to check.
Any suggesions or what am I missing here? Thanks.I have these 2 statements one below the other and
JButton btnNew = new JButton(MainFrame.LoadImageIcon("new.gif"));
JButton btnOpenProject = new JButton(MainFrame.LoadImageIcon("open.gif"));
for the above it gets the icon and for the below it doesn't from the jar. Why is it so? I don't understand. help me thru this. I am not getting any icon except for the new.gif. What am I doing wrong here? Thanks. -
Printing Goods Receipt labels from a PO after the inspection is done
Hi Guys,
Just wondering if you can help me...
I am having problems to print to 2 differents printer a WEE1 output type labels from MB90, like::
-If is ACCEPTED, it will print to PRINTER A;
-IF is REJECTED, it will print to PRINTER B.
What is the best way to do it?
Thanks heaps.Hi
you can use user exit QSS10001 Possibility of calling a different print report.
You can hardcode output device & call SAPLPDE printer as per UD
Regards
Sujit
Maybe you are looking for
-
Windows 8.1 will not boot anymore. Please help!
I have a Macbook Pro mid 2012. It has been running Windows 8.1 via bootcamp perfectly fine for almost six months until this morning. I went to turn it on and I am taken to a screen that says "Preparing Automatic Recovery". From there, I am taken to a
-
Updating a transparent table primary key
Hi Guys, I am fixing a system copy error, for that plan to update the table through a program. The field I am going to update one of the primary key field. Is that possible to do it. Thanks
-
Photostream not syncing on ipad
I have photos on my iphone and can sync with my mac laptop, but not the ipad? Any advice? Thanks!
-
Hi, I have an int x = 5; 0000 0000 0000 0000 0000 0000 0000 0101 ~x converts to: 1111 1111 1111 1111 1111 1111 1111 1010 Now, x = -6 WHY???? I know that the 32th digit represents the -ve sign. How to compute the number "6"? Thanks for help. gogo
-
Hi Guys, I would like to asked for your help regarding BDC_OKCODE. I need the system to accept automatically the BDC_OKCODE rather than ticking the check box to accept the BDC_CODE. Thanks in advance! Regards, Michael Nacionales