Mouse scroll, I need help
Hi
I'am using java 1.4.2 in my app. The thing is that i want to be able to scroll my JScrollPane, which java 1.4.2 supportes. The problem is that it doesnt work on all clients. Can someone please show me how to make my own scroll, using mouselistner or something or does anyone know why it doesnt work on all computers, and what I can do about it?
thanx
Hi
Try adding all your components to the Scrollpane and set scrollPane.setAutoscrolls(true); so that you can get the vertical and horizontal scroll bars
for eg:to add a jtable to a scrollpane we use
scrollPane = new JScrollPane(jTable1);
jTable1.setBounds(new Rectangle(2, 20, 805, 300));
scrollPane.setBounds(new Rectangle(2, 20, 805, 280));
scrollPane.setAutoscrolls(true);
Hope this helps.
Thanks
Similar Messages
-
Filmstrip photo gallery scrolling effect, need help...
Heya,
If you visit
http://www.hookmedia.biz/cabinet_source/v4_f
and goto the photo gallery you'll notice that the photo gallery
works well except that the filmstrips doesn't scroll left or right.
Now, I built this one based off of a Kirupa tutorial, and when the
photo gallery is in a sepereate .swf it works great. But as soon as
I copy the frames to my site that particular effect, and only that,
stops working. Can anyone help me? Thanks!
You can access the fla at
http://www.hookmedia.biz/cabinet_source/v4_f/index.flaThanks aniebel, but I think that'll be a last resort for me
considering I'm nearly done with this one, I just need help fixing
whatever the issue is. But thanks a ton anyway!
PS The link to the tutorial is:
http://www.kirupa.com/developer/mx2004/thumbnails7.htm -
I have an applet that contains too much information to fit on the screen, so I need a scrollbar so I can view the rest. The kind of scrollbar that's on the side of a web browser that lets you scroll down to view the rest of the page. It's a class that extends Applet and implements MouseListener and ActionListener. I've looked around the internet for the solution for an hour and found nothing. Any help would be much appreciated
Put a JScrollpane your ScrollPane as the main Panel of your applet, then put the content of your applet in a JPanel yourPanel and finaly call yourScrollPane.setViewPortView(yourPanel).
Try that. It should work. -
Question
My Rocketfish 2.4ghz wireless mouse scrolls fine on other browsers but I can't on Firefox. Any help is appreciated as I really want to use Firefox but need the scroll function. ThanksHad this problem for quite a while but found a work-a-round. I click anywhere in the text I want to delete and insert any character. I am then able to block and delete any text I want to. It's been working great.
-
Need help on how to a user can control a video clip using their mouse
I need help. I've got a video clip of a rotating 3D
object(left to right) and i would like the user to be able to
control the rotation of the object using their mouse. I've looked
everywhere and i'm at a lost. Can anyone help me
Here is a link to what i'm trying to achieve:
http://www.sun.com/servers/blades/6000/gallery/index.xml?p=1&s=2
I know they use Java but i'm sure this can be done in Flash.
Thanks
RayHere are the instructions...
Update firmware with DOS CD
To boot from CD you have to hold down the option key (<alt>) during startup. A HDD icon and a CD should appear on the gray screen. The HDD has the volume name written below and the CD is named Windows. Select the CD and boot to DOS.
Hit <ESC> to skip the README.TXT
Use PG UP/DOWN keys on an external keyboard to scroll through the readme, using arrow keys may lock DOS.
SeaFlash offers some options you should explore before performing the update. If you just want to do it ASAP then hit <D>.
Hit <L> to list compatible drives and FW version. (Column New FW version should state SD24, hit <ESC> to go back to main menu.)
Hit to scan your drive(s). (Shows your model and FW, <ESC> for main menu)
Finally hit <D> to update your Momentus XT to SD24. (takes about 15s to update)
Power off your Mac.
-- Although it did made sense to what you are saying to just follow Seagate's instructions. But they only had instructions outside the realm of MS Windows is to burn it on a disk and run a cold boot to the disk drive. Otherwise if Seagate did provide detail instruction on how to install this then can you provide me a link?
Thanks again.... -
Hello,
I need some help with a project. What I eventually want is that a webcam controls the mouse position and the mouse position
controls a video. But first I would like the part where the mouse position controls the video.
So if the mouse is on the left on your screen the video will be at the first frame and when you move you're mouse to
the right the video will play accordingly to the movement. and stop when the mouse is all the way to the right.
Effectivly the mouse scrolles through the video. It only needs to be on the x-axis.
I'm not that formilliar with flash so any help would be great
Thx!
ThijsI fixed it in an other way.
Made a imgseq and following code (with some help ):
stop();
stage.addEventListener(Event.RESIZE, resizeHandler);
stage.addEventListener(FullScreenEvent.FULL_SCREEN, resizeHandler);
stage.addEventListener(MouseEvent.MOUSE_MOVE, inputHandler);
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
var imgSeq:ImgSeq = new ImgSeq();
var columnWidth;
var numColumns;
stage.addChild(imgSeq);
imgSeq.x = 350
imgSeq.gotoAndStop(1);
columnWidth = stage.stageWidth / imgSeq.totalFrames;
numColumns = stage.stageWidth / columnWidth;
function resizeHandler(e:Event):void {
// verdeel het scherm in kolommen, iedere keer dat het scherm geresized wordt.
// breedte van 1 kolom (schermbreedte gedeeld door aantal plaatjes)
columnWidth = stage.stageWidth / imgSeq.totalFrames;
// totaal aantal kolommen dat binnen het scherm past (breedte gedeeld door breedte van één kolom )
numColumns = stage.stageWidth / columnWidth;
function inputHandler(e:MouseEvent):void {
// voer dit iedere keer dat je de muis beweegt uit.
// kijk voor iedere kolom of de muis er binnen valt.
for(var i = 1; i <= numColumns; i++){
//vergelijking die checkt of de muispositie binnen de waarden van kolom valt.
if(mouseX <= i * columnWidth && mouseX >= (i * columnWidth) - columnWidth ){
// zet het framenummer van de imageSequence gelijk aan de huidige kolom.
imgSeq.gotoAndStop(i);
many thx! -
Need help with JTextArea and Scrolling
import java.awt.*;
import java.awt.event.*;
import java.text.DecimalFormat;
import javax.swing.*;
public class MORT_RETRY extends JFrame implements ActionListener
private JPanel keypad;
private JPanel buttons;
private JTextField lcdLoanAmt;
private JTextField lcdInterestRate;
private JTextField lcdTerm;
private JTextField lcdMonthlyPmt;
private JTextArea displayArea;
private JButton CalculateBtn;
private JButton ClrBtn;
private JButton CloseBtn;
private JButton Amortize;
private JScrollPane scroll;
private DecimalFormat calcPattern = new DecimalFormat("$###,###.00");
private String[] rateTerm = {"", "7years @ 5.35%", "15years @ 5.5%", "30years @ 5.75%"};
private JComboBox rateTermList;
double interest[] = {5.35, 5.5, 5.75};
int term[] = {7, 15, 30};
double balance, interestAmt, monthlyInterest, monthlyPayment, monPmtInt, monPmtPrin;
int termInMonths, month, termLoop, monthLoop;
public MORT_RETRY()
Container pane = getContentPane();
lcdLoanAmt = new JTextField();
lcdMonthlyPmt = new JTextField();
displayArea = new JTextArea();//DEFINE COMBOBOX AND SCROLL
rateTermList = new JComboBox(rateTerm);
scroll = new JScrollPane(displayArea);
scroll.setSize(600,170);
scroll.setLocation(150,270);//DEFINE BUTTONS
CalculateBtn = new JButton("Calculate");
ClrBtn = new JButton("Clear Fields");
CloseBtn = new JButton("Close");
Amortize = new JButton("Amortize");//DEFINE PANEL(S)
keypad = new JPanel();
buttons = new JPanel();//DEFINE KEYPAD PANEL LAYOUT
keypad.setLayout(new GridLayout( 4, 2, 5, 5));//SET CONTROLS ON KEYPAD PANEL
keypad.add(new JLabel("Loan Amount$ : "));
keypad.add(lcdLoanAmt);
keypad.add(new JLabel("Term of loan and Interest Rate: "));
keypad.add(rateTermList);
keypad.add(new JLabel("Monthly Payment : "));
keypad.add(lcdMonthlyPmt);
lcdMonthlyPmt.setEditable(false);
keypad.add(new JLabel("Amortize Table:"));
keypad.add(displayArea);
displayArea.setEditable(false);//DEFINE BUTTONS PANEL LAYOUT
buttons.setLayout(new GridLayout( 1, 3, 5, 5));//SET CONTROLS ON BUTTONS PANEL
buttons.add(CalculateBtn);
buttons.add(Amortize);
buttons.add(ClrBtn);
buttons.add(CloseBtn);//ADD ACTION LISTENER
CalculateBtn.addActionListener(this);
ClrBtn.addActionListener(this);
CloseBtn.addActionListener(this);
Amortize.addActionListener(this);
rateTermList.addActionListener(this);//ADD PANELS
pane.add(keypad, BorderLayout.NORTH);
pane.add(buttons, BorderLayout.SOUTH);
pane.add(scroll, BorderLayout.CENTER);
addWindowListener( new WindowAdapter()
public void windowClosing(WindowEvent e)
System.exit(0);
public void actionPerformed(ActionEvent e)
String arg = lcdLoanAmt.getText();
int combined = Integer.parseInt(arg);
if (e.getSource() == CalculateBtn)
try
JOptionPane.showMessageDialog(null, "Got try here", "Error", JOptionPane.ERROR_MESSAGE);
catch(NumberFormatException ev)
JOptionPane.showMessageDialog(null, "Got here", "Error", JOptionPane.ERROR_MESSAGE);
if ((e.getSource() == CalculateBtn) && (arg != null))
try{
if ((e.getSource() == CalculateBtn) && (rateTermList.getSelectedIndex() == 1))
monthlyInterest = interest[0] / (12 * 100);
termInMonths = term[0] * 12;
monthlyPayment = combined * (monthlyInterest / (1 - (Math.pow (1 + monthlyInterest, -termInMonths))));
lcdMonthlyPmt.setText(calcPattern.format(monthlyPayment));
if ((e.getSource() == CalculateBtn) && (rateTermList.getSelectedIndex() == 2))
monthlyInterest = interest[1] / (12 * 100);
termInMonths = term[1] * 12;
monthlyPayment = combined * (monthlyInterest / (1 - (Math.pow (1 + monthlyInterest, -termInMonths))));
lcdMonthlyPmt.setText(calcPattern.format(monthlyPayment));
if ((e.getSource() == CalculateBtn) && (rateTermList.getSelectedIndex() == 3))
monthlyInterest = interest[2] / (12 * 100);
termInMonths = term[2] * 12;
monthlyPayment = combined * (monthlyInterest / (1 - (Math.pow (1 + monthlyInterest, -termInMonths))));
lcdMonthlyPmt.setText(calcPattern.format(monthlyPayment));
catch(NumberFormatException ev)
JOptionPane.showMessageDialog(null, "Invalid Entry!\nPlease Try Again", "Error", JOptionPane.ERROR_MESSAGE);
} //IF STATEMENTS FOR AMORTIZATION
if ((e.getSource() == Amortize) && (rateTermList.getSelectedIndex() == 1))
loopy(7, 5.35);
if ((e.getSource() == Amortize) && (rateTermList.getSelectedIndex() == 2))
loopy(15, 5.5);
if ((e.getSource() == Amortize) && (rateTermList.getSelectedIndex() == 3))
loopy(30, 5.75);
if (e.getSource() == ClrBtn)
rateTermList.setSelectedIndex(0);
lcdLoanAmt.setText(null);
lcdMonthlyPmt.setText(null);
displayArea.setText(null);
if (e.getSource() == CloseBtn)
System.exit(0);
private void loopy(int lTerm,double lInterest)
double total, monthly, monthlyrate, monthint, monthprin, balance, lastint, paid;
int amount, months, termloop, monthloop;
String lcd2 = lcdLoanAmt.getText();
amount = Integer.parseInt(lcd2);
termloop = 1;
paid = 0.00;
monthlyrate = lInterest / (12 * 100);
months = lTerm * 12;
monthly = amount *(monthlyrate/(1-Math.pow(1+monthlyrate,-months)));
total = months * monthly;
balance = amount;
while (termloop <= lTerm)
displayArea.setCaretPosition(0);
displayArea.append("\n");
displayArea.append("Year " + termloop + " of " + lTerm + ": payments\n");
displayArea.append("\n");
displayArea.append("Month\tMonthly\tPrinciple\tInterest\tBalance\n");
monthloop = 1;
while (monthloop <= 12)
monthint = balance * monthlyrate;
monthprin = monthly - monthint;
balance -= monthprin;
paid += monthly;
displayArea.setCaretPosition(0);
displayArea.append(monthloop + "\t" + calcPattern.format(monthly) + "\t" + calcPattern.format(monthprin) + "\t");
displayArea.append(calcPattern.format(monthint) + "\t" + calcPattern.format(balance) + "\n");
monthloop ++;
termloop ++;
public static void main(String args[])
MORT_RETRY f = new MORT_RETRY();
f.setTitle("MORTGAGE PAYMENT CALCULATOR");
f.setBounds(600, 600, 500, 500);
f.setLocationRelativeTo(null);
f.setVisible(true);
}need help with displaying the textarea correctly and the scroll bar please.
Message was edited by:
new2this2020What's the problem you're having ???
PS. -
I need help adding a mouse motion listner to my game. PLEASE i need it for
I need help adding a mouse motion listner to my game. PLEASE i need it for a grade.
i have a basic game that shoots target how can use the motion listner so that paint objects (the aim) move with the mouse.
i am able to shoot targets but it jus clicks to them ive been using this:
public void mouse() {
dotX = mouseX;
dotY = mouseY;
int d = Math.abs(dotX - (targetX + 60/2)) + Math.abs(dotY - (targetY + 60/2));
if(d < 15) {
score++;
s1 = "" + score;
else {
score--;
s1 = "" + score;
and here's my cross hairs used for aiming
//lines
page.setStroke(new BasicStroke(1));
page.setColor(Color.green);
page.drawLine(dotX-10,dotY,dotX+10,dotY);
page.drawLine(dotX,dotY-10,dotX,dotY+10);
//cricle
page.setColor(new Color(0,168,0,100));
page.fillOval(dotX-10,dotY-10,20,20);
please can some1 help meplease can some1 help meNot when you triple post a question:
http://forum.java.sun.com/thread.jspa?threadID=5244281
http://forum.java.sun.com/thread.jspa?threadID=5244277 -
Need help on how a user can control a video clip using their mouse
I need help. I've got a video clip of a rotating 3D
object(left to right) and i would like the user to be able to
control the rotation of the object using their mouse. I've looked
everywhere and i'm at a lost. Can anyone help me
Here is a link to what i'm trying to achieve:
http://www.sun.com/servers/blades/6000/gallery/index.xml?p=1&s=2
I know they use Java but i'm sure this can be done in Flash.
Thanks
RayJust use the plain linear fit!
(If you are discussing something you found in the forum, you should always include a link so we can see what you area talking about. What you probably found was a workaround that forces an intercept of zero for a special scenario. If you want to use general linear fit anyway, your matrix simply also needs a constant term)
If you still have problems, show us your code and some data.
LabVIEW Champion . Do more with less code and in less time . -
HT4144 i need help with my magic mouse
i need help with my new magic mouse
My wife and i are not teck savy, had trouble with magic mouse not finding computer for weeks,
We then discoverd some batteries do not connect well in mouse and have had not one shread of problem sence putting in Energizer[ industrial] batteries good luck. -
My apple wireless mouse scrolls in the opposite direction. When I scroll up, down, right and left it always scrolls the opposite direction. Can anyone help?
Hi Malky H.,
Thanks for visiting Apple Support Communities.
If your mouse is not scrolling in the direction you are expecting, check this Mouse setting in System Preferences:
Choose Apple menu > System Preferences, then click Mouse.
Scroll direction: natural: Select this option to move the contents of a window in the same direction as your fingers.
You can find this information here:
OS X Yosemite: Use an Apple Magic Mouse
Note that these steps apply to previous versions of Mac OS X as well.
Best Regards,
Jeremy -
Need Help.. Mighty Mouse not working in Windows & Internet connection prob
This is my situation.. The new Imac G5, after i installed windows on it. it can detect the mighty mouse but it need a passcode for it. i've tried a few passcode. such as (1111,0000,123456) but it still can't, can someone give me a clue about this situation..?? but the mighty mouse is connected when i'm running mac os X.. n after that i've another problem.. which is the internet connection will disconnect every half an hour when i'm running a windows.. i think that is my internet connection.. but i've already tested the wireless internet connection in my house by using another notebook and it works and not disconnected.. can somebody help me for this problem..?? i will be very happy to hear any solution from you all.. thx a lot before..
Welcome, you should be posting in the intel forum, I'll ask to have your post moved there. You need to pair your mouse with your computer. Open Bluetooth Setup Assistant and follow the instructions, you will b given a code for the mouse.
-
Need help with inserting frame with scrolling images
Hi,
Im a beginner and need help putting a single box/frame with scrolling images in the middle of my layout, so that when viewed in browser, the header and footer remain in place, while the images and info in the frame in the centre of the page can be scrolled down/up?You can use an iframe element <iframe src="" width="" height="" scrolling="yes"> though if you're concerned with crawlers you should avoid frames as much as possible.
-
My Vista Home Premium desktop has not used Firefox for a long time. I just loaded it as well as on my Honeycomb Android. The statement that I made pretty much says what my problem is. I can use both of them at the same time and use a router with the air Verizon card installed.
I'll repeat my question: This is detailed: I lost my touch pad scroll ability on my desktop when I installed Firefox, I am having a terrible time trying to sync my new Android tablet to my desktop, my desktop Firefox is acting very strangely (I need help trying to use it)My Vista Home Premium desktop has not used Firefox for a long time. I just loaded it as well as on my Honeycomb Android. The statement that I made pretty much says what my problem is. I can use both of them at the same time and use a router with the air Verizon card installed.
I'll repeat my question: This is detailed: I lost my touch pad scroll ability on my desktop when I installed Firefox, I am having a terrible time trying to sync my new Android tablet to my desktop, my desktop Firefox is acting very strangely (I need help trying to use it) -
I need help scrolling and highlighting for a vast amount of pics that I'm trying to transfer. I have a macbook pro osx 10.5.8
I need help scrolling and highlighting for a vast amount of pics that I'm trying to transfer. I have a macbook pro osx 10.5.8
Maybe you are looking for
-
Everytime I click on the menu to login to my school portal, it opens the drop down menu but it never loads the actual tab I'm clicking on. I don't know if that's because of settings or what it is but I've tried everything possible. I also noticed the
-
How to write a formula using Boolean Operators?
Dear BW mates, I have two Key Figures <b>stock</b> and <b>Prevous 12 week Stock</b>. I want to calculate <b>Excee stock</b> from these with the following condition. If <b>Prevous 12 week Stock</b>is less than <b>stock</b>then substract <b>Prevous 12
-
Hi folks, I had a following test on Oracle 11g in Linux 5.4(a vmware machine) for the parameter sqlnet.expire_time. 1. configure the parameter sqlnet.expire_time in sqlnet.ora and the parameter resource_limit keep false. [oracle@orasrv admin]$ more s
-
Custom Field in TCode VA02, Screen 102, Program SAPLEB
Hi, We ant a custom field on screen number 102 program SAPLEBNE, TCode VA02. To achieve this we have added a custom field in structure CI_EBANDB in table EBAN. However the field is not visible on the screen. To navigate to the screen, where we want t
-
When running the billing due list (VF04) for order related documents, our users want to see the field "order reason" in the results. I am not able to add any fields in the results of VF04. I checked the layout settings and found that SAP does not al