Scroll Bar Error!
My younger sister logged onto Facebook, and now I can't get off! Facebook's pages are too wide for Firefox, and usually there's a horizontal scroll bar at the bottom of the screen, along with the vertical one on the right of the screen. The horizontal one is gone! I cannot access the 'log off' button on Facebook, or anything further right of the page, for that matter.
Firefox being my choice above Safari, and (UGH!) Explorer, this is QUITE frustrating, to say the least.
The horizontal scroll bar is present on some sites, eg on mozilla.com, but, although I've tried the Reset option repeatedly, on Facebook it doesn't appear even when I resize the window. I'm using 5.01. This may be a fault with Facebook (I'm on Win7)
Similar Messages
-
EBay 'My Messages' scroll bar error in Firefox 3.6.20. Does not
Windows 7 Home Premium 64 bit
Firefox 3.6.20
There is a problem with the scroll bar in Firefox 3.6.20 when displaying eBay 'My Messages'
There are 26 message headers per page (in both IE 9 and Firefox 3.6.20).
Both browsers require scrolling to view the full 26 headers per page.
IE allows 3 presses of the touchpad on the space under the scroll button. All 26 headers per page are correctly displayed.
Firefox only allows 2 touchpad presses, giving the impression that the bottom of the page of headers has been reached. The impression is given that all 26 headers have been displayed, but only 15 have been seen.
To see all 26 it is necessary to use the 'down arrow' on the keypad.
Firefox hides 11 message headers when the page is scrolled using the side scroll bar.
I think this is a bug.
I do not want to use IE 9 or Firefox 4.0
RegardsI hate to sound like a broken record, DONE THAT ALREADY. _ _ _
I've ALSO learned to reboot after an uninstall then manually delete any residue in said uninstalled program. I've also gone as far as REGISTER searching for program residue and deleting that WITH reboot of coarse to be sure nothing has gone wrong. _ _ _ NEXT suggestion? I suggest FireFox fix there software. _ _ _ BY-THE-WAY,... I have also gone through my mouses buttton choices for my #5 button. Everything works but the "Auto-Scroll". One tab down/up/right/left works, one page down/up/left/right works. _ _ _ I used recently tried and successfully used the Auto-Scroll in Netscape, Opera, My Browser, Ace Browser, Chrome, and 2 others that escape my memory. _ _ _ PLEASE READ and understand this. >>> It's FireFox's software that is stopping this, not my mouse or PC. -
Hello all,
I work for a company using BI 7.0.
We provide reports in Bex Web 7.0 to our users. They requested us for a problem in list box of selection (or filter).
for example the user wants to filter on a characteristic. This characteristic has multiple possible values.
He chooses a value on the first page of the list box. then he wants to select an other value and uses the scroll bar. So he clicks in the gap of the scroll bar in order to go to the next page of values. It happens correctly but we figured out that doing so the new page wasn't exactly the exact next values available.
Indeed for example the first page displays 10 values (from 1 to 10) so by clicking in the gap we should go to the 10 next values 11 to 20 but it is not what is happening because the displayed values are 13 to 22, so the values 11 and 12 were passed by the scroll bar and we need to do singles click on the scroll bar to display values 11 and 12.
Does someone have an answer for this issue ?
Thank you by advance.
JérémyThank you for your answer Michael.
I tried to apply the modification but there was no fix to my problem.
Here are screenshots to explain my problem :
Screen 1 = First page
http://www.monsterup.com/image.php?url=upload/1264688014660.jpg
Screen 2 = second page
http://www.monsterup.com/image.php?url=upload/1264688015650.jpg
Screen 3 = missigne values between fisrt and second page
http://www.monsterup.com/image.php?url=upload/1264688015672.jpg
Any other clue ?
Thanks
Jérémy -
What errors are indicated by the pink color on the scroll bar?
Here are the settings for the scroll bar:
Here is the scroll bar full of pink marks meaning the file is full of such errors:
Unfortunately, I can't figure out what they are. Could anyone offer a tip on this?
BTW, the project builds and runs fine without any problem.
HongHi Hong,
Which VS2013 version did you use?
So you mean that your project code doesn't have any error, but you still get the annotations, am I right?
If so, how about creating a simple app? For example, make sure that it has an error in code, how about the result?
I test it in my side with VS2013, it works well like the following screen shot.
Anyway, we have to make sure that whether all projects have the same issue, if all projects have the same issue, I doubt that it is your VS IDE issue.
Please disable all add-ins, and then reset your VS, re-disable some settings under Tools->Options->Text Editor, close VS, re-open it, test it again.
But if just one specific project has this issue, sorry for that we couldn't repro this issue, maybe you could share us a simple sample, I will test it in my side. For detailed error messages, I suggest you view the Error list window or the Output window.
Best Regards,
Jack
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Hi,
Suddenly while working with Firefox if I happen to drag the vertical scroll bar, a very abnormal behavior occurs. My screen dances up and down for a short time before either going black or getting restored but with no clicks working. The only way to resume is to force a restart of the system.
Any help would be deeply appreciated.
Thanks and Regards
DeepakThat didn't work. On trying to install a new driver I got the error the graphics driver could not find compatible graphics hardware. Is there anything else that can be done to at least prevent the hanging of the computer even if it means less features from Firefox being available?
-
Missing scroll bars on a pop up window in safari
I'm not even sure if Im in the right section for this question but I kept getting and error message under the safari topic. I have been trying to have my fantasy football draft, but whenever I open the window to enter the live draft there are no scroll bars. I can only see half of the page and its frustrating because I cant really see what Im doing. My draft is held through yahoo sports, I thought it just might be a problem with yahoo, but any other web browser I used on a different computer works just fine. Im pretty computer illiterate also.
HI,
I used on a different computer works just fine
That computer may be a different model and operating system?
Try this. From the Safari Menu Bar click Safari/Empty Cache. Relaunch Safari. If the behavior persists, from the Safari Menu Bar (top of your screen) click Safari / Preferences then select the Security tab.
Click the Show Cookies button. Delete all cookies related to; fantasy football / Yahoo.
Now click the Autofill tab in the preferences window. Click the Edit button next to: Other forms. Remove all.
Relaunch Safari.
If that didn't make a difference, click your Apple Menu (top left corner of your screen) then scroll down and click Software Updates. Make sure your system software is up to date.
Also, if you have any Safari third party add-ons that control scroll bars, that could be part of the problem.
Carolyn -
Hi Ppl,
I am using REUSE_ALV_COMMENTARY_WRITE to display top of page in ALV. The issue is i want to restrict the top-of-page height.
As of now if i have 10 lines to print...the top-of-page comes with 10 lines in display.
But i want some (say 4 or 5) to be visible with scroolbar and rest can be viewed by use of the scroll--bar movement!!
Any soln?? Please reply
Regards,
Santosh!!Hi Santosh,
I am not sure if that is possible by using FM approach. - REUSE_ALV_COMMENTARY_WRITE
But yes its possible if you are using Docking Container. with split container approach. ie. OOPs .
Refer sample code.
Constants Declaration
CONSTANTS: c_x TYPE c VALUE 'X',
c_mode TYPE char1 VALUE 'O',
c_mask TYPE char9 VALUE ',*.*,*.*.',
c_error_log TYPE tabname VALUE 'ZERROR_LOG',
c_succ TYPE iconname VALUE '@01@', "#EC *
c_fail TYPE iconname VALUE '@02@',
c_object TYPE emg_object VALUE 'PARTNER'," Legacy obj
c_opbuk TYPE opbuk_kk VALUE 'UK01',
c_split TYPE c
VALUE cl_abap_char_utilities=>horizontal_tab,
c_path TYPE char100
VALUE '/local/data/interface/A28/DM/OUT'.
*Variables Declaration
DATA: flg_pre TYPE c, " Flag - Presentation browse
flg_x TYPE c,
cnt_total TYPE char8, " Total Records processed
cnt_success TYPE char8, " Total Records success
cnt_failed TYPE char8, " Total Records failed
cnt_repeat TYPE char8.
*-- ALV Grid data declaration
CLASS v_lcl_event_receiver DEFINITION
CLASS lcl_event_receiver DEFINITION.
PUBLIC SECTION.
METHODS:
handle_print_top_of_page FOR EVENT print_top_of_page OF
cl_gui_alv_grid,
handle_top_of_page FOR EVENT top_of_page OF
cl_gui_alv_grid.
ENDCLASS. "o_lcl_event_receiver DEFINITION
ALV Data declaration
DATA : o_alvgrid TYPE REF TO cl_gui_alv_grid,
o_split TYPE REF TO cl_gui_easy_splitter_container,
o_dockingcontainer TYPE REF TO cl_gui_docking_container,
<b> o_container_top TYPE REF TO cl_gui_container,
o_container_bot TYPE REF TO cl_gui_container,
o_html TYPE REF TO cl_dd_document,</b> o_event_receiver TYPE REF TO lcl_event_receiver,
ok_code LIKE sy-ucomm,
i_fieldcat TYPE lvc_t_fcat,
wa_fieldcat TYPE lvc_s_fcat,
wa_layout TYPE lvc_s_layo.
CLASS LCL_EVENT_RECEIVER IMPLEMENTATION
CLASS lcl_event_receiver IMPLEMENTATION.
*-- Top of Page
METHOD handle_print_top_of_page.
ENDMETHOD. "handle_print_top_of_page
METHOD handle_top_of_page.
ENDMETHOD. "handle_top_of_page
ENDCLASS. "lcl_event_receiver IMPLEMENTATION
*-- ALV List data declaration
DATA: i_field_cat1 TYPE slis_t_fieldcat_alv,
w_lay_out1 TYPE slis_layout_alv,
w_field_cat TYPE slis_fieldcat_alv,
i_events1 TYPE slis_t_event,
w_event TYPE slis_alv_event,
w_print TYPE slis_print_alv.
MODULE status_0100 OUTPUT.
SET PF-STATUS 'STANDARD'.
SET TITLEBAR 'TITLE'.
*-- Create Instances
PERFORM f0040_create_object.
*-- Create Field catalog
PERFORM f0050_field_catalog
TABLES i_fieldcat
USING c_error_log.
*-- Modify Field Catalog
PERFORM f0060_modify_fldcatalog
TABLES i_fieldcat.
*-- Set ALV Layout
PERFORM f0070_layout.
*-- Generate ALV Grid
PERFORM f0080_display_list
TABLES i_error
i_fieldcat
USING wa_layout.
ENDMODULE. " STATUS_0100 OUTPUT
*& Form f0040_create_object
FORM f0040_create_object .
IF cl_gui_alv_grid=>offline( ) IS INITIAL.
*-- Create Container
CREATE OBJECT o_dockingcontainer
EXPORTING
ratio = '95'
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5
OTHERS = 6.
IF sy-subrc NE 0.
MESSAGE i000 WITH text-013. " Error in object creation
LEAVE LIST-PROCESSING.
ENDIF.
*--Create Splitter Container
CREATE OBJECT o_split
EXPORTING
parent = o_dockingcontainer
sash_position = 20
with_border = 0
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 3.
*--Get the containers of the splitter control
o_container_top = o_split->top_left_container.
o_container_bot = o_split->bottom_right_container.
ENDIF.
CREATE OBJECT o_alvgrid
EXPORTING
i_parent = o_container_bot.
*-- Print Top of Page
PERFORM f0041_top_of_page.
ENDFORM. " f0040_create_object
<b>&----
*& Form f0041_top_of_page</b>
FORM f0041_top_of_page .
DATA: lws_text TYPE sdydo_text_element.
IF cl_gui_alv_grid=>offline( ) IS INITIAL.
*-- Object for HTML top container
CREATE OBJECT o_html
EXPORTING style = 'ALV_GRID'
background_color = 35.
*-- Top of Page
CALL METHOD o_alvgrid->list_processing_events
EXPORTING
i_event_name = 'TOP_OF_PAGE'
i_dyndoc_id = o_html.
*-- Total Record Text
CALL METHOD o_html->add_text
EXPORTING
text = text-014
sap_emphasis = text-017.
CALL METHOD o_html->add_gap
EXPORTING
width = 8.
**-- Total record Value
lws_text = cnt_total.
CALL METHOD o_html->add_text
EXPORTING
text = lws_text
sap_emphasis = text-017.
CLEAR lws_text.
CALL METHOD o_html->new_line
EXPORTING
repeat = 1.
**-- Total Success text
CALL METHOD o_html->add_text
EXPORTING
text = text-015
sap_emphasis = text-017
fix_lines = c_x.
CALL METHOD o_html->add_gap
EXPORTING
width = 12.
lws_text = cnt_success.
CALL METHOD o_html->add_text
EXPORTING
text = lws_text
sap_emphasis = text-017
fix_lines = c_x.
CLEAR lws_text.
CALL METHOD o_html->new_line
EXPORTING
repeat = 1.
*-- Total Failed text
CALL METHOD o_html->add_text
EXPORTING
text = text-016
sap_emphasis = text-017
fix_lines = c_x.
CALL METHOD o_html->add_gap
EXPORTING
width = 16.
lws_text = cnt_failed.
CALL METHOD o_html->add_text
EXPORTING
text = lws_text
sap_emphasis = text-017
fix_lines = c_x.
CLEAR lws_text.
*-- Display Report Header
<b> CALL METHOD o_html->display_document
EXPORTING
parent = o_container_top.</b>
ENDIF.
ENDFORM. " f0041_top_of_page
*& Form f0050_field_catalog
FORM f0050_field_catalog TABLES p_fieldcat STRUCTURE lvc_s_fcat
USING value(p_structure).
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = p_structure
CHANGING
ct_fieldcat = p_fieldcat[]
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE i000(zo_spa) WITH text-017.
LEAVE LIST-PROCESSING.
ENDIF.
ENDFORM. " f0050_field_catalog
*& Form f0070_layout
FORM f0070_layout .
wa_layout-zebra = c_x.
wa_layout-cwidth_opt = c_x.
ENDFORM. " f0070_layout
*& Form f0080_display_list
FORM f0080_display_list TABLES p_output
p_fieldcat
USING value(p_layout).
*-- Display Report
CALL METHOD o_alvgrid->set_table_for_first_display
EXPORTING
i_save = 'A'
is_layout = p_layout
CHANGING
it_outtab = p_output[]
it_fieldcatalog = p_fieldcat[]
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE i000(zo_spa) WITH text-022. " Error in Displaying
LEAVE LIST-PROCESSING.
ENDIF.
**-- Create Event object
CREATE OBJECT o_event_receiver.
SET HANDLER o_event_receiver->handle_print_top_of_page
FOR o_alvgrid.
ENDFORM. " f0080_display_list
*& Module USER_COMMAND_0100 INPUT
MODULE user_command_0100 INPUT.
ok_code = sy-ucomm.
CASE ok_code.
WHEN 'EXIT' OR 'CANC'.
PERFORM f4000_free_objects:
USING o_alvgrid 'ALV' text-031,
USING o_dockingcontainer 'DOCKING' text-032.
LEAVE PROGRAM.
WHEN 'BACK'.
PERFORM f4000_free_objects:
USING o_alvgrid 'ALV' text-031,
USING o_dockingcontainer 'DOCKING' text-032.
SET SCREEN '0'.
LEAVE SCREEN.
WHEN OTHERS.
PERFORM f4000_free_objects:
USING o_alvgrid 'ALV' text-031,
USING o_dockingcontainer 'DOCKING' text-032.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form f4000_free_objects
FORM f4000_free_objects USING pobject
value(ptype)
value(ptext) TYPE c.
DATA: lo_objectalv TYPE REF TO cl_gui_alv_grid.
CASE ptype.
WHEN 'ALV'.
lo_objectalv = pobject.
IF NOT ( lo_objectalv IS INITIAL ).
CALL METHOD lo_objectalv->free
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 3.
CLEAR: pobject, lo_objectalv.
PERFORM f4010_error_handle USING ptext.
ENDIF.
WHEN 'DOCKING'.
DATA: lo_objectdock TYPE REF TO cl_gui_docking_container.
lo_objectdock = pobject.
IF NOT ( lo_objectdock IS INITIAL ).
CALL METHOD lo_objectdock->free
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 3.
CLEAR: pobject, lo_objectdock.
PERFORM f4010_error_handle USING ptext.
ENDIF.
WHEN OTHERS.
sy-subrc = 1.
PERFORM f4010_error_handle
USING text-031.
ENDCASE.
ENDFORM. " f4000_free_objects
*& Form f4010_error_handle
FORM f4010_error_handle USING value(ptext) TYPE c.
IF sy-subrc NE 0.
CALL FUNCTION 'POPUP_TO_INFORM'
EXPORTING
titel = text-031
txt2 = sy-subrc
txt1 = ptext.
ENDIF.
ENDFORM. " f4010_error_handle
Reward points if this Helps.
Manish -
JTextArea w/Scroll bar wont scroll AND code drops through if statements
Hi, I'm still having trouble with the text area in the following code. When you run the code, you get the top arrow on the scroll bar, but the bottom is cut off. Also, a big problem is that no matter what choice is selected from the combo box, the code drops through to the last available value each time. Someone on the forums suggested using an array list for the values in the combo box, but I have not been able to figure out how to do that. A quick example would be apprciated.
Thank you in advance for any help
//Import required libraries
import java.awt.event.*;
import javax.swing.*;
import java.awt.*;
import java.io.*;
import java.text.*;
import java.math.*;
import java.util.*;
//Create the class
public class Week3Assignment407B extends JFrame implements ActionListener
//Panels used in container
private JPanel jPanelRateAndTermSelection;
//Variables for Menu items
private JMenuBar menuBar;
private JMenuItem exitMenuItem;
private JMenu fileMenu;
//Variables for user instruction and Entry
private JLabel jLabelPrincipal;
private JPanel jPanelEnterPrincipal;
private JLabel jLabelChooseRateAndTerm;
private JTextField jTextFieldMortgageAmt;
//Variables for combo box and buttons
private JComboBox TermAndRate;
private JButton buttonCompute;
private JButton buttonNew;
private JButton buttonClose;
//Variables display output
private JPanel jPanelPaymentOutput;
private JLabel jLabelPaymentOutput;
private JPanel jPanelErrorOutput;
private JLabel jLabelErrorOutput;
private JPanel jPanelAmoritizationSchedule;
private JTextArea jTextAreaAmoritization;
// Constructor
public Week3Assignment407B() {
super("Mortgage Application");
initComponents();
// create a method that will initialize the main frame for the GUI
private void initComponents()
setSize(700,400);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
Container pane = getContentPane();
GridLayout grid = new GridLayout(15, 1);
pane.setLayout(grid);
//declare all of the panels that will go inside the main frame
// Set up the menu Bar
menuBar = new JMenuBar();
fileMenu = new JMenu();
fileMenu.setText("File");
exitMenuItem = new JMenuItem();
exitMenuItem.setText("Exit");
fileMenu.add(exitMenuItem);
menuBar.add(fileMenu);
pane.add(menuBar);
//*******************TOP PANEL ENTER PRINCIPAL*****************************//
// Create a label that will advise user to enter a principle amount
jPanelEnterPrincipal = new JPanel();
jLabelPrincipal = new JLabel("Amt to borrow in whole numbers");
jTextFieldMortgageAmt = new JTextField(10);
GridLayout Principal = new GridLayout(1,2);
jPanelEnterPrincipal.setLayout(Principal);
jPanelEnterPrincipal.add(jLabelPrincipal);
jPanelEnterPrincipal.add(jTextFieldMortgageAmt);
pane.add(jPanelEnterPrincipal);
//****************MIDDLE PANEL CHOOSE INTEREST RATE AND TERM*****************//
// Create a label that will advise user to choose an Int rate and term combination
// from the combo box
jPanelRateAndTermSelection = new JPanel();
jLabelChooseRateAndTerm = new JLabel("Choose the Rate and Term");
buttonCompute = new JButton("Compute Mortgage");
buttonNew = new JButton("New Mortgage");
buttonClose = new JButton("Close");
GridLayout RateAndTerm = new GridLayout(1,5);
//FlowLayout RateAndTerm = new FlowLayout(FlowLayout.LEFT);
jPanelRateAndTermSelection.setLayout(RateAndTerm);
jPanelRateAndTermSelection.add(jLabelChooseRateAndTerm);
TermAndRate = new JComboBox();
jPanelRateAndTermSelection.add(TermAndRate);
TermAndRate.addItem("7 years at 5.35%");
TermAndRate.addItem("15 years at 5.5%");
TermAndRate.addItem("30 years at 5.75%");
jPanelRateAndTermSelection.add(buttonCompute);
jPanelRateAndTermSelection.add(buttonNew);
jPanelRateAndTermSelection.add(buttonClose);
pane.add(jPanelRateAndTermSelection);
//**************BOTTOM PANEL TEXT AREA FOR AMORITIZATION SCHEDULE***************//
jPanelAmoritizationSchedule = new JPanel();
jTextAreaAmoritization = new JTextArea(26,50);
// add scroll pane to output text area
JScrollPane scrollBar = new JScrollPane(jTextAreaAmoritization,
JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
jPanelAmoritizationSchedule.add(scrollBar);
pane.add(jPanelAmoritizationSchedule);
//***************ADD THE ACTION LISTENERS TO THE GUI COMPONENTS*****************//
// Add ActionListener to the buttons and menu item
exitMenuItem.addActionListener(this);
buttonCompute.addActionListener(this);
buttonNew.addActionListener(this);
buttonClose.addActionListener(this);
TermAndRate.addActionListener(this);
jTextFieldMortgageAmt.addActionListener(this);
//*************** Set up the Error output area*****************//
jPanelErrorOutput = new JPanel();
jLabelErrorOutput = new JLabel();
FlowLayout error = new FlowLayout();
jPanelErrorOutput.setLayout(error);
pane.add(jLabelErrorOutput);
setContentPane(pane);
pack();
setVisible(true);
//Display error messages
private void OutputError(String ErrorMsg){
jLabelErrorOutput.setText(ErrorMsg);
jPanelErrorOutput.setVisible(true);
//create a method that will clear all fields when the New Mortgage button is chosen
private void clearFields()
jTextAreaAmoritization.setText("");
jTextFieldMortgageAmt.setText("");
//**************CREATE THE CLASS THAT ACTUALLY DOES SOMETHING WITH THE EVENT*****//
//This is the section that receives the action source and directs what to do with it
public void actionPerformed(ActionEvent e)
Object source = e.getSource();
String ErrorMsg;
double principal;
double IntRate;
int Term;
double monthlypymt;
double TermInYears = 0 ;
if(source == buttonClose)
System.exit(0);
if (source == exitMenuItem) {
System.exit(0);
if (source == buttonNew)
clearFields();
if (source == buttonCompute)
//Make sure the user entered valid numbers
try
principal = Double.parseDouble(jTextFieldMortgageAmt.getText());
catch(NumberFormatException nfe)
ErrorMsg = (" You Entered an invalid Mortgage amount"
+ " Please try again. Please do not use commas or decimals");
jTextAreaAmoritization.setText(ErrorMsg);
principal = Double.parseDouble(jTextFieldMortgageAmt.getText());
if (TermAndRate.getSelectedItem() == "7 years at 5.35%") ;
Term = 7;
IntRate = 5.35;
if (TermAndRate.getSelectedItem() == "15 years at 5.5%") ;
Term = 15;
IntRate = 5.5;
if (TermAndRate.getSelectedItem() == "30 years at 5.75%") ;
Term = 30;
IntRate = 5.75;
//Variables have been checked for valid input, now calculate the monthly payment
NumberFormat formatter = new DecimalFormat ("$###,###.00");
double intdecimal = intdecimal = IntRate/(12 * 100);
int months = Term * 12;
double monthlypayment = principal *(intdecimal / (1- Math.pow((1 + intdecimal),-months)));
//Display the Amoritization schedule
jTextAreaAmoritization.setText(" Loan amount of " + formatter.format(principal)
+ "\n"
+ " Interest Rate is " + IntRate + "%"
+ "\n"
+ " Term in Years " + Term
+ " Monthly payment "+ formatter.format(monthlypayment)
+ "\n"
+ " Amoritization is as follows: "
+ "------------------------------------------------------------------------");
public Insets getInsets()
Insets around = new Insets(35,20,20,35);
return around;
//Main program
public static void main(String[]args) {
Week3Assignment407B frame = new Week3Assignment407B();
}here's your initComponents with a couple of changes, the problem was the Gridlayout(15,1)
also, the scrollpane needed a setPreferredSize()
private void initComponents()
setSize(700,400);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//Container pane = getContentPane();
JPanel pane = new JPanel();
//GridLayout grid = new GridLayout(15, 1);
GridLayout grid = new GridLayout(2, 1);
pane.setLayout(grid);
menuBar = new JMenuBar();
fileMenu = new JMenu();
fileMenu.setText("File");
exitMenuItem = new JMenuItem();
exitMenuItem.setText("Exit");
fileMenu.add(exitMenuItem);
menuBar.add(fileMenu);
//pane.add(menuBar);
setJMenuBar(menuBar);
jPanelEnterPrincipal = new JPanel();
jLabelPrincipal = new JLabel("Amt to borrow in whole numbers");
jTextFieldMortgageAmt = new JTextField(10);
GridLayout Principal = new GridLayout(1,2);
jPanelEnterPrincipal.setLayout(Principal);
jPanelEnterPrincipal.add(jLabelPrincipal);
jPanelEnterPrincipal.add(jTextFieldMortgageAmt);
pane.add(jPanelEnterPrincipal);
jPanelRateAndTermSelection = new JPanel();
jLabelChooseRateAndTerm = new JLabel("Choose the Rate and Term");
buttonCompute = new JButton("Compute Mortgage");
buttonNew = new JButton("New Mortgage");
buttonClose = new JButton("Close");
GridLayout RateAndTerm = new GridLayout(1,5);
jPanelRateAndTermSelection.setLayout(RateAndTerm);
jPanelRateAndTermSelection.add(jLabelChooseRateAndTerm);
TermAndRate = new JComboBox();
jPanelRateAndTermSelection.add(TermAndRate);
TermAndRate.addItem("7 years at 5.35%");
TermAndRate.addItem("15 years at 5.5%");
TermAndRate.addItem("30 years at 5.75%");
jPanelRateAndTermSelection.add(buttonCompute);
jPanelRateAndTermSelection.add(buttonNew);
jPanelRateAndTermSelection.add(buttonClose);
pane.add(jPanelRateAndTermSelection);
jPanelAmoritizationSchedule = new JPanel();
jTextAreaAmoritization = new JTextArea(26,50);
JScrollPane scrollBar = new JScrollPane(jTextAreaAmoritization,
JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
scrollBar.setPreferredSize(new Dimension(500,100));//<------------------------
jPanelAmoritizationSchedule.add(scrollBar);
getContentPane().add(pane,BorderLayout.NORTH);
getContentPane().add(jPanelAmoritizationSchedule,BorderLayout.CENTER);
exitMenuItem.addActionListener(this);
buttonCompute.addActionListener(this);
buttonNew.addActionListener(this);
buttonClose.addActionListener(this);
TermAndRate.addActionListener(this);
jTextFieldMortgageAmt.addActionListener(this);
jPanelErrorOutput = new JPanel();
jLabelErrorOutput = new JLabel();
FlowLayout error = new FlowLayout();
jPanelErrorOutput.setLayout(error);
//pane.add(jLabelErrorOutput);not worrying about this one
//setContentPane(pane);
pack();
setVisible(true);
}instead of
if (TermAndRate.getSelectedItem() == "7 years at 5.35%") ;
Term = 7;
IntRate = 5.35;
you would be better off setting up arrays
int[] term = {7,15,30};
double[] rate = {5.35,5.50,5.75};
then using getSelectedIndex()
int loan = TermAndRate.getSelectedIndex()
Term = term[loan];
IntRate = rate[loan]; -
Scroll bar problems ..Please help!!!!!!
This is what the program looks like. topPanel has newItemPanel on top of it. when you click continue newItemPanel becomes invisible and newItemDescriptionPanel becomes visible. When you click continue newItemDescriptionPanel becomes invisible and priceEnterPanel becomes visible.
I want newItemDescriptionPanel and priceEnterPanel to have a scroll bar. but everything I have tried hasn't worked. I am new. You will see the code is ugly and there is an attempt to add a scrollbar.
Please help
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import javax.swing.border.*;
import java.lang.System;
public class MainPanel extends JFrame implements ActionListener
private boolean firstRun = true;
private final int ITEM_PLAIN = 0; // Item types
private final int ITEM_CHECK = 1;
private final int ITEM_RADIO = 2;
private JPanel topPanel;
private JPanel newItemPanel;
private JRadioButton onlineAuctionRadio;
private JRadioButton fixedPriceRadio;
private ButtonGroup bg;
private JButton continueButton;
private JLabel blankLabel; //used to give space between things
private JPanel newItemDescriptionPanel;
private JPanel takeAdditionalSpacePanelCheckBox;
private JPanel takeAdditionalSpacePanel;
private JPanel takeAdditionalSpacePanelLabel;
private JPanel takeAdditionalSpacePanelLabel2;
private JPanel takeAdditionalSpacePanel2;
private JPanel takeAdditionalSpacePanel3;
private JPanel takeAdditionalSpacePanel4;
private JPanel takeAdditionalSpacePanel5;
JScrollPane displayScroller;
JEditorPane itemDescriptionTextArea;
GridBagLayout gridbag;
GridBagConstraints gbc;
private JCheckBox secondCategoryCheckBox;
private JLabel itemTitleLabel;
private JLabel requiredLabel, requiredLabel2;
private JLabel requiredStarLabel;
private JTextField itemTitleTextField;
private JLabel subtitleLabel;
private JTextField subtitleTextField;
private JLabel itemDescriptionLabel;
private JButton itemDescriptionContinueButton;
private JLabel percentageLabel;
//------- price enter page ----------------
private JLabel startingPriceLabel;
private JLabel dollarSignLabel;
private JTextField startingPriceTextField;
private JPanel fillUpSpacePanel;
private JPanel fillUpSpacePanel1;
private JPanel fillUpSpacePanel2;
private JLabel buyItNowLabel;
private JPanel fillUpSpacePanel3;
private JLabel dollarSignLabel2;
private JTextField buyItNowTextField;
private JPanel fillUpSpacePanel4;
private JPanel fillUpSpacePanel5;
private JPanel fillUpSpacePanel6;
private JPanel fillUpSpacePanel7;
private JPanel fillUpSpacePanel8;
private JPanel fillUpSpacePanel9;
private JPanel fillUpSpacePanel10;
private JPanel fillUpSpacePanel11;
private JPanel fillUpSpacePanel12;
private JPanel fillUpSpacePanel13;
private JPanel fillUpSpacePanel14;
private JPanel fillUpSpacePanel15;
private JPanel fillUpSpacePanel16;
private JPanel fillUpSpacePanel17;
private JPanel fillUpSpacePanel18;
private JLabel donatePercentageLabel;
private JTextField donatePercentageTextField;
private JPanel fSp; // fill space panel
private JPanel fSp1;
private JPanel fSp2;
private JPanel fSp3;
private JPanel fSp4;
private JPanel fSp5;
private JPanel fSp6;
private JPanel fSp7;
private JPanel fSp8;
private JPanel fSp9;
private JLabel numberOfPicturesLabel;
private JTextField numberOfPicturesTextField;
private JCheckBox superSizePicturesCheckBox;
private JLabel superSizePicturesLabel;
private JRadioButton standardPictureRadioButton;
private JRadioButton picturePackRadioButton;
private JCheckBox listingDesignerCheckBox;
private ButtonGroup bgPictures;
private JCheckBox valuePackCheckBox;
private JCheckBox galleryPictureCheckBox;
private JCheckBox subtitleCheckBox;
private JCheckBox boldCheckBox;
private JCheckBox borderCheckBox;
private JCheckBox highlightCheckBox;
private JCheckBox featuredPlusCheckBox;
private JCheckBox galleryFeaturedCheckBox;
private JLabel homePageFeaturedLabel;
private JComboBox homePageFeaturedComboBox;
private JCheckBox giftCheckBox;
JScrollPane priceEnterPanelScroll;
private JButton backToRadioButton;
private JButton backToItemDescriptionButton;
private JPanel priceEnterPanel;
private final static String RADIOPANEL = "JPanel with radios";
private final static String DESCRIPTIONPANEL = "JPanel with description";
private final static String PRICEENTERPANEL = "JPanel with price entering";
private JPanel cards;
private JMenuBar menuBar;
private JMenu menuFile;
private JMenu menuEdit;
private JMenu menuProperty;
private JMenuItem menuPropertySystem;
private JMenuItem menuPropertyEditor;
private JMenuItem menuPropertyDisplay;
private JMenu menuFileNew;
private JMenuItem menuFileNewAccount;
private JMenuItem menuFileNewItem;
private JMenuItem menuFileOpen;
private JMenuItem menuFileSave;
private JMenuItem menuFileSaveAs;
private JMenuItem menuFileExit;
private JMenuItem menuEditCopy;
private JMenuItem menuEditCut;
private JMenuItem menuEditPaste;
public MainPanel()
requiredLabel = new JLabel ("* Required");
requiredLabel.setForeground (Color.red);
requiredLabel2 = new JLabel ("* Required");
requiredLabel2.setForeground (Color.red);
requiredStarLabel = new JLabel ("*");
requiredStarLabel.setForeground (Color.green);
setTitle( "photo galleries" );
setSize( 310, 130 );
topPanel = new JPanel();
topPanel.setLayout( new BorderLayout() );
topPanel.setBorder (BorderFactory.createTitledBorder ("TopPanel"));
//topPanel.setPreferredSize(new Dimension (300,300));
getContentPane().add( topPanel );
topPanel.setVisible (false);
// For New Item Panel
ButtonListener ears = new ButtonListener();
blankLabel = new JLabel (" "); // used to give space between radio buttons and continue button
continueButton = new JButton ("Continue >");
continueButton.addActionListener (ears);
backToRadioButton = new JButton ("< back");
backToRadioButton.addActionListener (ears);
itemDescriptionContinueButton = new JButton ("Continue >");
itemDescriptionContinueButton.addActionListener (ears);
backToItemDescriptionButton = new JButton ("< back");
backToItemDescriptionButton.addActionListener (ears);
newItemPanel = new JPanel();
newItemPanel.setLayout (new BoxLayout(newItemPanel, BoxLayout.Y_AXIS));
//topPanel.add (newItemPanel, BorderLayout.NORTH);
newItemPanel.setBorder (BorderFactory.createTitledBorder ("NewItemPanel"));
newItemPanel.setVisible (false);
onlineAuctionRadio = new JRadioButton ("Sold item at online Auction" );
fixedPriceRadio = new JRadioButton ("Sold at a Fixed Price");
bg = new ButtonGroup();
bg.add(onlineAuctionRadio);
bg.add(fixedPriceRadio);
onlineAuctionRadio.addActionListener (ears);
fixedPriceRadio.addActionListener (ears);
newItemPanel.add (onlineAuctionRadio);
newItemPanel.add (fixedPriceRadio);
newItemPanel.add (blankLabel);
newItemPanel.add (continueButton);
// ------ After continue pressed ---------
newItemDescriptionPanel = new JPanel();
newItemDescriptionPanel.setLayout (new BoxLayout(newItemDescriptionPanel, BoxLayout.Y_AXIS));
newItemPanel.add (newItemDescriptionPanel, BorderLayout.NORTH);
newItemDescriptionPanel.setBorder (BorderFactory.createTitledBorder ("newItemDescriptionPanel"));
secondCategoryCheckBox = new JCheckBox ("The item was listed in a second category");
newItemDescriptionPanel.setVisible (false);
itemTitleLabel = new JLabel ("Item title");
itemTitleTextField = new JTextField (30);
subtitleLabel = new JLabel ("Subtitle ($0.50)");
subtitleTextField = new JTextField (30);
itemDescriptionLabel = new JLabel ("Item description");
itemDescriptionTextArea = new JEditorPane();
itemDescriptionTextArea.setContentType( "text/html" );
itemDescriptionTextArea.setEditable( false );
itemDescriptionTextArea.setPreferredSize(new Dimension (500,250));
itemDescriptionTextArea.setFont(new Font( "Serif", Font.PLAIN, 12 ));
itemDescriptionTextArea.setForeground( Color.black );
gbc = new GridBagConstraints();
gbc.gridx = 0;
gbc.gridy = 4;
displayScroller = new JScrollPane( itemDescriptionTextArea );
gridbag = new GridBagLayout ();
gridbag.setConstraints( displayScroller, gbc );
itemDescriptionTextArea.setEditable( true );
takeAdditionalSpacePanelCheckBox = new JPanel(new FlowLayout(FlowLayout.LEFT));
takeAdditionalSpacePanel = new JPanel(new FlowLayout(FlowLayout.LEFT));//<--added, to take additional space
takeAdditionalSpacePanelLabel = new JPanel(new FlowLayout(FlowLayout.LEFT));//<--added, to take additional space
takeAdditionalSpacePanelLabel2 = new JPanel(new FlowLayout(FlowLayout.LEFT));//<--added, to take additional space
takeAdditionalSpacePanel2 = new JPanel(new FlowLayout(FlowLayout.LEFT));//<--added, to take additional space
takeAdditionalSpacePanel3 = new JPanel(new FlowLayout(FlowLayout.LEFT));//<--added, to take additional space
takeAdditionalSpacePanel4 = new JPanel(new FlowLayout(FlowLayout.LEFT));
takeAdditionalSpacePanel5 = new JPanel(new FlowLayout(FlowLayout.LEFT));
//takeAdditionalSpacePanel2.setBorder (BorderFactory.createTitledBorder ("Additonal 2"));
takeAdditionalSpacePanelCheckBox.add (secondCategoryCheckBox);
newItemDescriptionPanel.add (takeAdditionalSpacePanelCheckBox);
//newItemDescriptionPanel.add (blankLabel);
takeAdditionalSpacePanelLabel.add (itemTitleLabel);
takeAdditionalSpacePanelLabel.add (requiredLabel);
newItemDescriptionPanel.add (takeAdditionalSpacePanelLabel);
//newItemDescriptionPanel.add (itemTitleTextField);
takeAdditionalSpacePanel.add(itemTitleTextField);//<--add textfield to panel
newItemDescriptionPanel.add (takeAdditionalSpacePanel);//<--add panel to boxlayout panel
takeAdditionalSpacePanelLabel2.add (subtitleLabel);
newItemDescriptionPanel.add (takeAdditionalSpacePanelLabel2);
takeAdditionalSpacePanel2.add (subtitleTextField);
newItemDescriptionPanel.add (takeAdditionalSpacePanel2);
takeAdditionalSpacePanel4.add (itemDescriptionLabel);
//takeAdditionalSpacePanel4.add (requiredLabel2);
newItemDescriptionPanel.add (takeAdditionalSpacePanel4);
takeAdditionalSpacePanel3.add (displayScroller);
newItemDescriptionPanel.add (takeAdditionalSpacePanel3);
takeAdditionalSpacePanel5.add (backToRadioButton);
takeAdditionalSpacePanel5.add (itemDescriptionContinueButton);
newItemDescriptionPanel.add (takeAdditionalSpacePanel5);
//newItemDescriptionPanel.setLayout (new BoxLayout(newItemDescriptionPanel, BoxLayout.Y_AXIS));
//----------- Price Enter Page ----------------
priceEnterPanel = new JPanel();
priceEnterPanel.setLayout (new BoxLayout(priceEnterPanel, BoxLayout.Y_AXIS));
newItemDescriptionPanel.add (priceEnterPanel, BorderLayout.NORTH);
priceEnterPanel.setBorder (BorderFactory.createTitledBorder ("Price enter Panel"));
priceEnterPanel.setVisible (false);
priceEnterPanelScroll = new JScrollPane (priceEnterPanel);
topPanel.add (priceEnterPanelScroll);
standardPictureRadioButton = new JRadioButton ("Standard");
picturePackRadioButton = new JRadioButton ("Picture Pack ($1.00 for up to 6 pictures or $1.50 for 7 to 12 pictures)");
bgPictures = new ButtonGroup();
bgPictures.add(standardPictureRadioButton);
bgPictures.add(picturePackRadioButton);
standardPictureRadioButton.addActionListener (ears);
picturePackRadioButton.addActionListener (ears);
superSizePicturesCheckBox = new JCheckBox ("Supersize Pictures ($0.75)");
listingDesignerCheckBox = new JCheckBox ("Listing designer $0.10");
valuePackCheckBox = new JCheckBox ("Get the Essentials for less! Gallery, Subtitle, Listing Designer. $0.65 (save $0.30)");
superSizePicturesCheckBox.setEnabled (false);
superSizePicturesCheckBox.addActionListener (ears);
listingDesignerCheckBox.addActionListener (ears);
valuePackCheckBox.addActionListener (ears);
startingPriceLabel = new JLabel ("Starting Price");
dollarSignLabel = new JLabel ("$");
startingPriceTextField = new JTextField (10);
buyItNowLabel = new JLabel ("Buy It Now");
dollarSignLabel2 = new JLabel ("$");
buyItNowTextField = new JTextField (10);
donatePercentageLabel = new JLabel ("Donate percentage of sale");
donatePercentageTextField = new JTextField (2);
donatePercentageTextField.setText ("0");
percentageLabel = new JLabel ("%");
// Right-justify the text
donatePercentageTextField.setHorizontalAlignment(JTextField.RIGHT);
numberOfPicturesLabel = new JLabel ("Number of pictures used");
numberOfPicturesTextField = new JTextField (1);
numberOfPicturesTextField.setText ("0");
galleryPictureCheckBox = new JCheckBox ("Gallery ($0.35) [Requires a picture]");
subtitleCheckBox = new JCheckBox ("Subtitle ($0.50)");
boldCheckBox = new JCheckBox ("Bold ($1.00)");
borderCheckBox = new JCheckBox ("Border ($3.00)");
highlightCheckBox = new JCheckBox ("Highlight ($5.00)");
featuredPlusCheckBox = new JCheckBox ("Featured Plus! ($19.95)");
galleryFeaturedCheckBox = new JCheckBox ("Gallery Featured ($19.95) [Requires a picture]");
homePageFeaturedLabel = new JLabel ("Home Page Featured ($39.95 for 1 item, $79.95 for 2 or more items)");
homePageFeaturedComboBox = new JComboBox ();
homePageFeaturedComboBox.addItem (("None..."));
homePageFeaturedComboBox.addItem (("1 item"));
homePageFeaturedComboBox.addItem (("2 or more items"));
giftCheckBox = new JCheckBox ("Show as a gift ($0.25)");
fillUpSpacePanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
fillUpSpacePanel1 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fillUpSpacePanel2 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fillUpSpacePanel3 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fillUpSpacePanel4 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fillUpSpacePanel5 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fillUpSpacePanel6 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fillUpSpacePanel7 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fillUpSpacePanel8 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fillUpSpacePanel9 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fillUpSpacePanel10 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fillUpSpacePanel11 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fillUpSpacePanel12 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fillUpSpacePanel13 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fillUpSpacePanel14 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fillUpSpacePanel15 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fillUpSpacePanel16 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fillUpSpacePanel17 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fillUpSpacePanel18 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fSp = new JPanel(new FlowLayout(FlowLayout.LEFT));
fSp1 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fSp2 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fSp3 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fSp4 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fSp5 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fSp6 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fSp7 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fSp8 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fSp9 = new JPanel(new FlowLayout(FlowLayout.LEFT));
fillUpSpacePanel.add (startingPriceLabel);
fillUpSpacePanel.add (requiredLabel2);
priceEnterPanel.add (fillUpSpacePanel);
fillUpSpacePanel2.add (dollarSignLabel);
fillUpSpacePanel2.add (startingPriceTextField);
priceEnterPanel.add (fillUpSpacePanel2);
// fillUpSpacePanel1.add (backToItemDescriptionButton);
// priceEnterPanel.add (fillUpSpacePanel1);
fillUpSpacePanel3.add (buyItNowLabel);
priceEnterPanel.add (fillUpSpacePanel3);
fillUpSpacePanel4.add (dollarSignLabel2);
fillUpSpacePanel4.add (buyItNowTextField);
priceEnterPanel.add (fillUpSpacePanel4);
fillUpSpacePanel1.add (donatePercentageLabel);
priceEnterPanel.add (fillUpSpacePanel1);
fillUpSpacePanel5.add (donatePercentageTextField);
fillUpSpacePanel5.add (percentageLabel);
priceEnterPanel.add (fillUpSpacePanel5);
fillUpSpacePanel6.add (numberOfPicturesLabel);
priceEnterPanel.add (fillUpSpacePanel6);
fillUpSpacePanel7.add (numberOfPicturesTextField);
priceEnterPanel.add (fillUpSpacePanel7);
fillUpSpacePanel8.add (standardPictureRadioButton);
priceEnterPanel.add (fillUpSpacePanel8);
fillUpSpacePanel10.add (blankLabel);
fillUpSpacePanel10.add (superSizePicturesCheckBox);
priceEnterPanel.add (fillUpSpacePanel10);
fillUpSpacePanel9.add (picturePackRadioButton);
priceEnterPanel.add (fillUpSpacePanel10);
fillUpSpacePanel11.add (picturePackRadioButton);
priceEnterPanel.add (fillUpSpacePanel11);
fillUpSpacePanel12.add (listingDesignerCheckBox);
priceEnterPanel.add (fillUpSpacePanel12);
fillUpSpacePanel13.add (valuePackCheckBox);
priceEnterPanel.add (fillUpSpacePanel13);
fSp.add (galleryPictureCheckBox);
priceEnterPanel.add (fSp);
fSp1.add (subtitleCheckBox);
priceEnterPanel.add (fSp1);
fSp2.add (boldCheckBox);
priceEnterPanel.add (fSp2);
fSp3.add (borderCheckBox);
priceEnterPanel.add (fSp3);
fSp4.add (highlightCheckBox);
priceEnterPanel.add (fSp4);
fSp5.add (featuredPlusCheckBox);
priceEnterPanel.add (fSp5);
fSp6.add (galleryFeaturedCheckBox);
priceEnterPanel.add (fSp6);
fSp7.add (homePageFeaturedLabel);
priceEnterPanel.add (fSp7);
fSp8.add (homePageFeaturedComboBox);
priceEnterPanel.add (fSp8);
fSp9.add (giftCheckBox);
priceEnterPanel.add (fSp9);
newItemDescriptionPanel.add (priceEnterPanelScroll);
//Create the panel that contains the "cards".
cards = new JPanel(new CardLayout());
cards.add(newItemPanel, RADIOPANEL);
cards.add(newItemDescriptionPanel, DESCRIPTIONPANEL);
cards.add(priceEnterPanel, PRICEENTERPANEL);
topPanel.add(cards, BorderLayout.NORTH);
// Create the menu bar
menuBar = new JMenuBar();
// Set this instance as the application's menu bar
setJMenuBar( menuBar );
// Build the property sub-menu
menuProperty = new JMenu( "Properties" );
menuProperty.setMnemonic( 'P' );
// Create property items
menuPropertySystem = CreateMenuItem( menuProperty, ITEM_PLAIN,
"System...", null, 'S', null );
menuPropertyEditor = CreateMenuItem( menuProperty, ITEM_PLAIN,
"Editor...", null, 'E', null );
menuPropertyDisplay = CreateMenuItem( menuProperty, ITEM_PLAIN,
"Display...", null, 'D', null );
//Build the File-New sub-menu
menuFileNew = new JMenu ("New");
menuFileNew.setMnemonic ('N');
//Create File-New items
menuFileNewItem = CreateMenuItem( menuFileNew, ITEM_PLAIN,
"Item", null, 'A', null );
menuFileNewAccount = CreateMenuItem( menuFileNew, ITEM_PLAIN,
"Account", null, 'A', null );
// Create the file menu
menuFile = new JMenu( "File" );
menuFile.setMnemonic( 'F' );
menuBar.add( menuFile );
//Add the File-New menu
menuFile.add( menuFileNew );
// Create the file menu
// Build a file menu items
menuFileOpen = CreateMenuItem( menuFile, ITEM_PLAIN, "Open...",
new ImageIcon( "open.gif" ), 'O',
"Open a new file" );
menuFileSave = CreateMenuItem( menuFile, ITEM_PLAIN, "Save",
new ImageIcon( "save.gif" ), 'S',
" Save this file" );
menuFileSaveAs = CreateMenuItem( menuFile, ITEM_PLAIN,
"Save As...", null, 'A',
"Save this data to a new file" );
// Add the property menu
menuFile.addSeparator();
menuFile.add( menuProperty );
menuFile.addSeparator();
menuFileExit = CreateMenuItem( menuFile, ITEM_PLAIN,
"Exit", null, 'X',
"Exit the program" );
//menuFileExit.addActionListener(this);
// Create the file menu
menuEdit = new JMenu( "Edit" );
menuEdit.setMnemonic( 'E' );
menuBar.add( menuEdit );
// Create edit menu options
menuEditCut = CreateMenuItem( menuEdit, ITEM_PLAIN,
"Cut", null, 'T',
"Cut data to the clipboard" );
menuEditCopy = CreateMenuItem( menuEdit, ITEM_PLAIN,
"Copy", null, 'C',
"Copy data to the clipboard" );
menuEditPaste = CreateMenuItem( menuEdit, ITEM_PLAIN,
"Paste", null, 'P',
"Paste data from the clipboard" );
public JMenuItem CreateMenuItem( JMenu menu, int iType, String sText,
ImageIcon image, int acceleratorKey,
String sToolTip )
// Create the item
JMenuItem menuItem;
switch( iType )
case ITEM_RADIO:
menuItem = new JRadioButtonMenuItem();
break;
case ITEM_CHECK:
menuItem = new JCheckBoxMenuItem();
break;
default:
menuItem = new JMenuItem();
break;
// Add the item test
menuItem.setText( sText );
// Add the optional icon
if( image != null )
menuItem.setIcon( image );
// Add the accelerator key
if( acceleratorKey > 0 )
menuItem.setMnemonic( acceleratorKey );
// Add the optional tool tip text
if( sToolTip != null )
menuItem.setToolTipText( sToolTip );
// Add an action handler to this menu item
menuItem.addActionListener( this );
menu.add( menuItem );
return menuItem;
public void actionPerformed( ActionEvent event )
CardLayout cl = (CardLayout)(cards.getLayout());
if (event.getSource() == menuFileExit)
System.exit(0);
if (event.getSource() == menuFileNewAccount)
System.out.println ("hlkadflkajfalkdjfalksfj");
if (event.getSource() == menuFileNewItem){
if (firstRun){
newItemPanel.setVisible (true);
topPanel.setVisible (true);
cl.show(cards,RADIOPANEL);
firstRun = false;
//System.out.println( event );
private class ButtonListener implements ActionListener
public void actionPerformed(ActionEvent event)
CardLayout cl = (CardLayout)(cards.getLayout());
// cl.show(cards, (String)evt.getItem());
if (event.getSource() == continueButton){
if (!(onlineAuctionRadio.isSelected()) && !(fixedPriceRadio.isSelected()))
JOptionPane.showMessageDialog(null, "You must select at least one.", "Error", JOptionPane.ERROR_MESSAGE);
else{
if (onlineAuctionRadio.isSelected()){
cl.show (cards, DESCRIPTIONPANEL);
//newItemPanel.setVisible (false);
//newItemDescriptionPanel.setVisible (true);
if (event.getSource() == itemDescriptionContinueButton){
if (itemTitleTextField.getText().trim().equalsIgnoreCase(""))
JOptionPane.showMessageDialog(null, "You must enter a title.", "Error", JOptionPane.ERROR_MESSAGE);
else
cl.show (cards, PRICEENTERPANEL);
if (event.getSource() == backToRadioButton){
cl.show (cards, RADIOPANEL);
if (event.getSource() == backToItemDescriptionButton){
cl.show(cards, DESCRIPTIONPANEL);
if (standardPictureRadioButton.isSelected()){
superSizePicturesCheckBox.setEnabled (true);
if (picturePackRadioButton.isSelected()){
superSizePicturesCheckBox.setEnabled (false);
} //end of action performed
}Mostly I see there is about 100 times as much code as I care to look at.
So you don't know how to get a panel in a scroll pane, and then get that scroll pane into your GUI? Then try doing that by itself, not encumbered with 10000 lines of irrelevant code. Once you have it working, plug it into the big lump of code. Or if you can't get it working, ask about the small problem here. -
will not let me attach a screenprint
Hi Dale,
Everything was maximized so that wasn't it. When I went into another project schedule it did not happen at all.
This was a dumb user error problem. :-( The horizontal scroll bar disappeared because all the columns fit on the screen so there was nothing to scroll. However I wanted to stretch out the most far right column (the Notes column) so that it would print
nicely on legal landscape paper and it wouldn't let me. Of course I fixed it by widening a different column which brought the horizontal scroll bar back.
What's weird is I never had this problem with MSP 2010 (probably just coincidentally) so of course I wanted to blame 2013 since I just got it. :-)
Thanks for your help.
Lindy -
How do I lock the scroll bar on, keeping valid HTML5?
I have a site that was originally created in FrontPage some years ago, and I have now redone it using Muse (not before time, I hear you say!)
There were several pages on the site where the content was not large enough to need to be scrolled on most displays, and some browsers removed the scroll bar from the right of the page when those pages were visited. This resulted in a shift to the right on those pages, which made all the fixed elements move on the screen when going between pages, which I found very annoying.
I fixed it by adding this code to the pages in question -
<style type="text/css">
/* Force Right Scrollbar */
html { overflow-y : scroll; }
</style>
This worked fine and locked the scroll bar on, and I wanted to do the same with the Muse version of the site.
I have added the same code using the add HTML feature, and it still works fine.
However, if I run any of the pages concerned through a validator, I get the error -
Validation Output: 1 Error
Line 23, Column 28: Element style is missing required attribute scoped.
<style type="text/css">
I tried to find out why this was, but all I found was a lot of standards documents which were mostly way over my head!
So, is there any modification I can do to that code to get it through the validator, or do I need to look at a different method of locking the scroll bar on on my web pages?
Thanks for any and all suggestions!
Dave.Thanks very much jgrummel and Vikas.Sharma!
Sorry for the delay in responding.
I have now added "scoped="scoped"" to the code, and the validater (http://validator.w3.org) is now showing just a warning rather than an error.
"Line 23, Column 44: The scoped attribute on the style element is not supported by browsers yet. It would probably be better to wait for implementations.
<style type="text/css" scoped="scoped">"
I'm not too worrid about that, as it is still passing it!
The code is inserted on the master page of my site, so it presumably propagates through to all the pages, including those that don't need it, but this doesn't seem to cause any problem.
The site is here - http://www.thedraculasociety.org.uk -
Table with fixed header and scroll bar
Was able to use Dreamweaver 2004 to set up a table to display
data from a MySQL table. But then the customer wanted to have a
scroll bar on one side and fixed headers at the top "like Excel",
because the number of rows retrieved were too long to fit on a
page. This was harder than I thought. I had to use CSS and
Javascript with a lot of help to make this happen. Then it didn't
work in IE7, so I had to use a different approach for IE. I got it
to almost work perfectly in IE7. It just has a tiny bit of the
table visible scrolling by above the header rows.
http://www.ykfp.org/php/lyletrap/tabletotalscss13.php
Why does Microsoft make this so difficult? Why aren't web standards
good enough for Microsoft? Is there a better approach to tables
with scroll bars?When things go sour in any browser, validate your code. I see you have some unclosed <table> tags which could effect page rendering.
http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.ykfp.org%2Fphp%2Flyletrap%2Ft abletotalscss09.php
If you still have problems with IE8 after fixing the code errors, try adding this meta tag to your <head>. It forces IE8 into IE7 mode.
<meta http-equiv="X-UA-Compatible" content="IE=7">
Hope that helps,
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media Specialists
http://alt-web.com/
http://twitter.com/altweb
http://alt-web.blogspot.com -
The scroll bar is not working properly on long designs.
When i scroll a design inside muse the scroll button keeps dropping stopping the scrolling.
Its like the cursor is not locking properly to the scroll bar.@
I use mac, i use a wacom intous 5 touch. I don't get this error in any other adobe program / browser / ui's..
Video of it here > Muse Scroll error.mp4 - YouTube
//PoulGPlease install the latest update of Muse and then check if you it same behavior.
Thanks,
Sanjit -
Scroll Bar missing on Safari web pages and unfamiliar screen saver image
I recently upgraded my OS X from Panther to Tiger v. 10.4.11 and upgraded to Safari 3.1.2. Now the scroll bar down the right side is missing from the open web page in Safari. Where did it go and how do I get it back?
Also, unfamiliar images appear, something like a screen saver when I leave my computer for a
few minutes without putting it to sleep or shutting it down. It's a black/white/gray portrait of
a woman and as the picture moves around the screen, the image magnifies. I have no idea
where this image came from nor how to get rid of it. Any ideas?Hi Busy1, and a warm welcome to the forums!
Could be many things, we should start with this...
"Try Disk Utility
1. Insert the Mac OS X Install disc that came with your computer, then restart the computer while holding the C key.
2. When your computer finishes starting up from the disc, choose Disk Utility from the Installer menu. (In Mac OS X 10.4 or later, you must select your language first.)
Important: Do not click Continue in the first screen of the Installer. If you do, you must restart from the disc again to access Disk Utility.
3. Click the First Aid tab.
4. Click the disclosure triangle to the left of the hard drive icon to display the names of your hard disk volumes and partitions.
5. Select your Mac OS X volume.
6. Click Repair. Disk Utility checks and repairs the disk."
http://docs.info.apple.com/article.html?artnum=106214
Then Safe Boot from the HD, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, reboot when it finishes.
The usual reason why updates fail or mess things up, or things don't load/run, is if Permissions are not fixed before & after every update, with a reboot... you may get a partial update when the installer finds it doesn't have Permissions to change one obscure little part of the OS, leaving you with a mix of OS versions.
Some people get away without Repairing Permissions for years, some for only days.
If Permissions are wrong before applying an update, you could get mixed OS versions, if Directory is the slightest messed up, who knows!
If many Permission are repaired, or any Directory errors are found, you may need to re-apply some the latest/biggest updates again, or even do an A&I if you have enough free disk space.
The combo update for PowerPC-based Macs...
http://www.apple.com/support/downloads/macosx10411comboupdateppc.html
The combo update for Intel-based Macs...
http://www.apple.com/support/downloads/macosx10411comboupdateintel.html
Repair Permissions after re-install, then reboot again.
If all the above do not resolve the problem, then it's time for an Archive & Install, which gives you a new OS, but can preserve all your files, pics, music, settings, etc., as long as you have plenty of free disk space...
http://docs.info.apple.com/article.html?artnum=107120
Might try this for Scroll Bars...
http://lifehacker.com/5040043/add-double-scroll-arrows-to-both-ends-of-the-scrol l-bar
when I leave my computer for a
few minutes without putting it to sleep or shutting it down...
Check System Preferences>Desktop & Screen Saver>Screen saver Tab for that. -
Ok what I have is a site I am building for school. I have some textfields loaded from a outside file. Some of the fields have more text then will show in the size of the box, and you can sroll it down to read it all but unless you try to scroll there is really now way to tell you can do it just buy looking at the text box. So I want to add a scroll bar and we have not covered that in class.
Note everything has to be added using AS3 we can have no content on the timeline. I have look to try to find something so show me how to dod this but all I can find are videos on doing it using the stage and adding items to it.Can you make it a little more plane please. I am working on so much other sruff along with this I am drawing a blank. I tried a couple things but get this arroa code.
TypeError: Error #1034: Type Coercion failed: cannot convert fl.containers::ScrollPane@311540b1 to flash.display.MovieClip.
at flash.display::Sprite/constructChildren()
at flash.display::Sprite()
at flash.display::MovieClip()
at beta_fla::MainTimeline()
Maybe you are looking for
-
It's important to remember that DEFAULT values are only used when a column isn't specified in an INSERT or MERGE, or when the DEFAULT keyword is used. If you don't explicitly declare a DEFAULT value, Oracle implicitly defines the default value to be
-
When I bought my Macbook Pro on Thursday I also purchased Pages whilst in the Apple store in town. The assistant helped me start the installation whilst I was there and he told me that it would continue when I got home, even if i shut the laptop down
-
LiveCycle Workbench ES2 - "Java(TM) Platform SE binary has stopped working" Error
Hi, I am getting this error when I try to create a new process o open an existing process. "Java(TM) Platform SE binary has stopped working" The only option is to click on a "Close" button and end the LC Workbench ES2 program. Also, when I try to ope
-
Credit Control Area Management
Dear All As part of Enhancement, we are configuring the "Customer Credit management" with Credit Control area organizational object. Client has identified to use "Decentralized" Credit control management, but however, all comapny codes are assigne
-
Sending documents they are so small receiving cannot read
Using mail when sending attachments usually some document, pdf, jpeg etc it attaches like a thumbnail and it is so small the receiver cannot expand to make larger without bluring the document. I don't remember ever having this issue before. How can