Need help with tables in dreamweaver
So I can insert a table in dreamweaver but fine tuning it is
a problem.
I cannot find how to access individual cell properties to
apply borders on only the sides of the cells I want. Also I can
configure the width of the columns only by dragging the divider
left and right. It does not allow me to input figures anywhere to
set column widths.
To set the widths in the HTML, look in the properties panel
and find the "cell" area near the bottom left. You can enter a
pixel value there.
To set borders for individual sides you should use CSS. Read
up in the help section about external style sheets. You can also
set your widths there if you like.
Similar Messages
-
Need help with session using dreamweaver
have created a login page (php/mysql) with username and
password boxes. when the form is submitted the mainpage loads up.
i want the main page to be specific to that user, so i want
their name to appear in the first line. eg.. Welcome back 'David'
I read a tutorial in the past that tought me to send the
users id in the URL and then create a record set on the mainpage
that was filtered by the URL parameter.
I have forgotten how to do this and the tutorial is no longer
available on Adobe's site.
I tried that with
$_SESSION['MM_Username'] = $loginUsername; \\ in first page
then
echo $_SESSION["MM_username"]; \\in second page, but the
problem is that is not showing user name.
i need help with that please!
can anyone tell me how to do this? Thanks in advance,
AMIN the second page, you have to make sure that the session
has been started.
Put this at the very top of the page -
<?php if (!isset($_SESSION)) session_start(); ?>
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"Alidad" <[email protected]> wrote in
message
news:g184i4$jgf$[email protected]..
> have created a login page (php/mysql) with username and
password boxes.
> when
> the form is submitted the mainpage loads up.
>
> i want the main page to be specific to that user, so i
want their name to
> appear in the first line. eg.. Welcome back 'David'
>
> I read a tutorial in the past that tought me to send the
users id in the
> URL
> and then create a record set on the mainpage that was
filtered by the URL
> parameter.
>
> I have forgotten how to do this and the tutorial is no
longer available on
> Adobe's site.
>
> I tried that with
> $_SESSION['MM_Username'] = $loginUsername; \\ in first
page then
> echo $_SESSION["MM_username"]; \\in second page, but
> the
> problem is that is not showing user name.
>
> i need help with that please!
>
> can anyone tell me how to do this? Thanks in advance,
>
> AM
> -
Need help with spacing in Dreamweaver
Hi I need help I making a site in Dreamweaver using a box format. I have ever thing done but I have a gap between my header and nav-bar that I can not close. What should I do?
By default, browsers add their own margins and padding to HTML elements. Many people use a CSS Reset to remove this default spacing and then add their own values to individual CSS selectors.
This quick and dirty reset uses an asterisk (*) as a wildcard selector. This removes default margins and padding from everything:
CSS:
* {margin:0; padding:0}
Other CSS Reset Methods:
http://cssresetr.com/
Nancy O. -
Need help with table partitions
Hi all,
I'm new at partitions and tablespaces and I've been asked to create a partition for a table. First off, here's a sample table that I have.
create table M_TRANS (
TRAN_ID NUMBER,
MONTH_KEY INTEGER,
ACCOUNT_KEY INTEGER,
ACCOUNT_NUMBER CHAR(8),
LINE_KEY VARCHAR2(40),
SERVICE_TYPE VARCHAR2(10)
)I need to create a range partition based on Month_Key and list sub-partition based on last char of Line_Key.
MONTH_KEY has a data format of "YYYYMM" (200802).
LINE_KEY's last char should be in 0-9 / A-Z. 1 partition for each number 0-9 and 1 partition for alphabet values.
Upon reading articles, samples on this particular subject, I came up with this...
create table M_TRANS (
TRAN_ID NUMBER,
MONTH_KEY INTEGER,
ACCOUNT_KEY INTEGER,
ACCOUNT_NUMBER CHAR(8),
LINE_KEY NUMBER,
SERVICE_TYPE VARCHAR2(10)
PARTITION BY RANGE(MONTH_KEY)
SUBPARTITION BY LIST (LINE_KEY)
SUBPARTITION TEMPLATE(
SUBPARTITION P_0 VALUES 1 TABLESPACE TS_0,
SUBPARTITION P_1 VALUES 2 TABLESPACE TS_1,
SUBPARTITION P_2 VALUES 3 TABLESPACE TS_2,
SUBPARTITION P_3 VALUES 4 TABLESPACE TS_3,
SUBPARTITION P_4 VALUES 5 TABLESPACE TS_4,
SUBPARTITION P_5 VALUES 6 TABLESPACE TS_5,
SUBPARTITION P_6 VALUES 7 TABLESPACE TS_6,
SUBPARTITION P_7 VALUES 8 TABLESPACE TS_7,
SUBPARTITION P_8 VALUES 9 TABLESPACE TS_8,
SUBPARTITION P_9 VALUES 0 TABLESPACE TS_9,
SUBPARTITION P_AZ VALUES ('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z') TABLESPACE TS_AZ
PARTITION M_JAN VALUES 'JAN'
PARTITION M_FEB VALUES 'FEB'
PARTITION M_MAR VALUES 'MAR'
PARTITION M_APR VALUES 'APR'
PARTITION M_MAY VALUES 'MAY'
PARTITION M_JUN VALUES 'JUN'
PARTITION M_JUL VALUES 'JUL'
PARTITION M_AUG VALUES 'AUG'
PARTITION M_SEP VALUES 'SEP'
PARTITION M_OCT VALUES 'OCT'
PARTITION M_NOV VALUES 'NOV'
PARTITION M_DEC VALUES 'DEC'
);The only problem is that since the MONTH_KEY has a format of "YYYYMM", how do I compare just the last 2 numbers. Same goes with the LINE_KEY.
Can some help me? Thanks.
Regards,
A.SandiegoIn 10g and earlier, you need to create separate columns for the last 1-2 characters and use those columns as partitioning keys.
In 11g, you can use virtual columns:
CREATE TABLE M_TRANS (
TRAN_ID NUMBER,
MONTH_KEY INTEGER,
LINE_KEY VARCHAR2(40),
MONTH_ONLY as ((month_key/100-trunc(month_key/100))*100),
LAST_CHAR as (upper(substr(line_key,length(line_key),1)))
PARTITION BY RANGE(MONTH_ONLY)
SUBPARTITION BY LIST (LAST_CHAR)
SUBPARTITION TEMPLATE (
SUBPARTITION P_0 VALUES ('1'),
SUBPARTITION P_1 VALUES ('2'),
SUBPARTITION P_2 VALUES ('3'),
SUBPARTITION P_AZ VALUES ('A','B','C')
PARTITION M_JAN VALUES LESS THAN (2),
PARTITION M_FEB VALUES LESS THAN (3),
PARTITION M_MAR VALUES LESS THAN (4) -
Need help with tables beginner........
can some one help me straightned out these errors, am trying to teach myself some sql for and am using my buddies school books. this is the problem.
Create the following relations in SQLPLUS. The columns involved in composing the primary key for each table are marked with a *.
* FACULTY (*fss_num varchar2(20), name varchar2(20), address varchar2(20), age number,salary number(10,2))
* ATTENDS (*sss_num varchar2(20), *c_num number, sec_num number)
* SECTION (*c_num number,*sec_num number,fss_num varchar2(20))
* STUDENT (*sss_num varchar2(20), name varchar2(20), address varchar2(20), age number)
* COURSE (*c_num number, cdesc varchar2(20), credits number, size_limit number)
My solution: seems right am following another example but i get various errors.
DROP TABLE ATTENDS;
DROP TABLE STUDENT;
DROP TABLE SECTION;
DROP TABLE COURSE;
DROP TABLE FACULTY;
CREATE TABLE FACULTY
(FSS_NUM VARCHAR2(20) NOT NULL,
NAME VARCHAR2(20) NOT NULL,
ADDRESS VARCHAR2(20),
AGE NUMBER,
SALARY NUMBER(10,2),
CONSTRAINT FACULTY_PK PRIMARY KEY (FSS_NUM));
CREATE TABLE COURSE
(C_NUM NUMBER NOT NULL,
CDESC VARCHAR2(20),
CREDITS NUMBER,
SIZE_LIMIT NUMBER,
CONSTRAINT COURSE_PK PRIMARY KEY (C_NUM));
CREATE TABLE STUDENT
(SSS_NUM VARCHAR2(20) NOT NULL,
NAME VARCHAR2(20) NOT NULL,
ADDRESS VARCHAR2(20),
AGE NUMBER,
CONSTRAINT STUDENT_PK PRIMARY KEY (SSS_NUM));
CREATE TABLE ATTENDS
(SSS_NUM VARCHAR2(20) NOT NULL,
C_NUM NUMBER NOT NULL,
SEC_NUM NUMBER NOT NULL,
CONSTRAINT ATTENDS_PK PRIMARY KEY (SSS_NUM, C_NUM),
CONSTRAINT ATTENDS_FK1 FOREIGN KEY (SSS_NUM) REFERENCES STUDENT(SSS_NUM),
CONSTRAINT ATTENDS_FK2 FOREIGN KEY (C_NUM) REFERENCES COURSE(C_NUM));
CREATE TABLE SECTION
(C_NUM NUMBER NOT NULL,
SEC_NUM NUMBER NOT NULL,
FSS_NUM VARCHAR2(20) NOT NULL,
CONSTRAINT SECTION_PK PRIMARY KEY (C_NUM, SEC_NUM),
CONSTRAINT SECTION_FK1 FOREIGN KEY (C_NUM) REFERENCES COURSE(C_NUM));Hi,
If you want to give Primary Key constraint for a column, no need to create NOT NULL constraint again for the same column.
If you create Primary Key constraint for a composite column, only possible to create Foreign Key on the same composite column.
Mistake.....if PRIMARY KEY(SSS_NUM, C_NUM), we should not either FOREIGN KEY(SSS_NUM) or FOREIGN KEY(C_NUM). We should create only like FOREIGN KEY(SSS_NUM, C_NUM).
Regards,
Sailaja -
Need help with table, xml files, click actions and visibility
Hi.
I am new to adobe livecycle and I need some guidance in a problem that I am facing.
I have an XML. The main tag 'employee' has 4 tags in it, name, age, ph# and address.
Address tag has 6 more tags in it.
I have to create a table which has 4 columns initially (all text fields). The rows are populated acccording to the XML.
1. S. No., which increments according to row number.
2. Name from XML.
3. Age from XML.
4. ph# from XML.
When any S. No. is clicked on, it should display the address details below that row, when it is clicked on again, it should hide those details and the original table view should be restored.
I googled a lot but am still not able to get how to do this.
Please help.I created a sample for you with what I think you want. Here is a file and the associated XML that goes with it.
Paul -
Need help with Table of Content
Hi,
I have recently started working with Robohelp 7. I just
completed my first project working with the tool. This project has
several Topics, and each topic has sub-topic under them. When I
generated the html files, I had given the Introductory sub-topic as
the default topic.
Now after the files are generated, I cannot open any other
topic in the table of content until I expand the topic containing
the default sub-topic. This issue is basically with Firefox
browser. It seems to work well with Safari. IE anyways opens the
folder containing the default topic.
I am not sure if any other user have faced similar problems?
Would like to hear from you guys too.Welcome to the forum
Whenever you install new software, check for updates before
starting work.
Go to Help | Updates and apply both patches.
Regenerate your help and try again. It should be OK. -
Need help with URLs (Mamp/Dreamweaver/Apple Lion)
I'm in the midst of a major upgrade - Apple Leopard > Lion and MAMP 1.x to 2.0.5. I also installed CS3, with Dreamweaver, on my new laptop.
Anyway, everything seems to be falling in place, except for one major snag - I can't view my web pages in a browser.
On my old laptop, I have it set up so that I can view each of my websites at a simple URL, like this: http://SL. My sites are stored in a top level folder named Sites.
I used the settings in my old computer as a guide in setting up a site in Dreamweaver and MAMP/Hosts on my new laptop, but I can't view a page at http://SL. http://localhost/SL and http://localhost don't work, either, whereas http://localhost:8888 prompts a "Forbidden" message.
However, I can access phpMyAdmin at http://localhost:8888/phpMyAdmin/?lang=en-iso-8859-1&language=English
When I was setting up the site in Dreamweaver, I got the following error message:
"Dreamweaver cannot use the prefix you entered to displaly live data. Please double-check your site configuration or click on Help for more information on how to correct this problem. (HTTP Error: 0)." I didn't explore the Help menu immediately, and I can't recreate the error message now.
I read somewhere that I should put my html folders in the htdocs folder so I tried that with one site, with the same result.
Anyway, can anyone tell me what I have to do to make a website located at Users > (Me) > Sites > SL display at http://SL?
Thanks.In MAMP Pro setup ports for Apache/MySQL to 80/3306 then setup virtual host in Hosts tab. MAMP doesn't allow extending virtual hosts, only MAMP Pro does that. Are you using MAMP or MAMP Pro?
best,
Shocker -
Hi,
I am working with two tables... Table1 is a history table and Table2 is current table which has only 2 rows...
I am asked to write a procedure such that when ever a third row is inserted to Table2 then the 1st row in Table2 has to be moved to Table1....
Both the tables have same attributes
I know i have to use for loop on table2 and check for the number of rows and then move the 1st row to table1... but what i am not getting is how to move it to table1 and how to delete it in table2...
Please help me out,,,
Thank You for trying to help me.Then you can write something like this:
SQL> create table t_history (id,description)
2 as
3 select 1, 'x' from dual
4 /
Tabel is aangemaakt.
SQL> create table t_current (id,description)
2 as
3 select 2, 'y' from dual union all
4 select 3, 'z' from dual
5 /
Tabel is aangemaakt.
SQL> create procedure add_record
2 ( p_id in t_current.id%type
3 , p_description in t_current.description%type
4 )
5 is
6 begin
7 insert into t_history
8 select min(id)
9 , max(description) keep (dense_rank first order by id)
10 from t_current
11 ;
12 update t_current
13 set id = p_id
14 , description = p_description
15 where id = (select min(id) from t_current)
16 ;
17 end add_record;
18 /
Procedure is aangemaakt.
SQL> exec add_record(4,'a')
PL/SQL-procedure is geslaagd.
SQL> select * from t_current
2 /
ID D
4 a
3 z
2 rijen zijn geselecteerd.
SQL> select * from t_history
2 /
ID D
1 x
2 y
2 rijen zijn geselecteerd.
SQL> exec add_record(5,'b')
PL/SQL-procedure is geslaagd.
SQL> select * from t_current
2 /
ID D
4 a
5 b
2 rijen zijn geselecteerd.
SQL> select * from t_history
2 /
ID D
1 x
2 y
3 z
3 rijen zijn geselecteerd.But if you take your profession seriously, I think you should persist to opt for the better solution: use a view.
Regards,
Rob. -
Need help with Tables Handling
This is a tricky problem, maybe not for you guys, here it is:
I have a table with 4 colums and N rows, i want to write data (int) on the 1st and 3rd columns and In the 4th column I want to show up the result of 1st X 3rd (1st times 3rd), I tried many times but so far I've got nothing good, some help would be appreciated, thank you! ; )I have a table with 4 colums and N rows, i want to
write data (int) on the 1st and 3rd columns and In
the 4th column I want to show up the result of 1st X
3rd (1st times 3rd), I tried many times but so far
I've got nothing good, some help would be
appreciated, thank you! ; )Here you go:
int n = 10; // number of rows
int[][] table = new int[n][4];
// 4th column from the first row = the 1st column multiplied with the 3rd
table[0][3] = table[0][0] * table[0][2]; -
Need help with integrating a dreamweaver file and an edge file
Alright so I have been trying to do this for far to long so I am asking for some help this is for a web design class.
I am trying to either import a edge composition to a dreamweaver file or use the publish file from the edge file to make a completed website by adding a css navigation bar from an external css file. I want to have the css menu to the left of the logo. I have tried this numerous times but either the menu doesn't show up and is either behind the edge stage or its not there at all. When I tried it from a fresh html page and imported it from an oam file the images from the stage never showed up and I am unsure how to fix that.
^right there.
Here are the files
Dropbox - Archive.zip
Thanks for the help.I found the z-index for the edge animate code and it was set to 0 and i set the menu div to 40 but nothing happened and it didn't show up. This where i set the menu to a higher value and I'm not sure if this is correct, I also tried it in the css file but that also didn't work.
<div id='cssmenu' style="z-index:40;">
<ul>
<li><a href='index.html'>Sell Cards</a>
<ul>
<li><a href='#'>Pricing Guide</a></li>
<li><a href='buyList.html'>Buy List</a></li>
</ul>
</li>
<li><a href='#'>Sealed Product</a>
<ul>
<li><a href='Promotional Items'>List of Sets</a></li>
<li><a href='#'>Promotional Items</a></li>
</ul>
</li>
<li><a href='#'>Other Games</a></li>
<li><a href='supplies.html'>Gaming Supplies</a></li>
</ul>
</div> -
Need help with saving data and keeping table history for one BP
Hi all
I need help with this one ,
Scenario:
When adding a new vendor on the system the vendor is suppose to have a tax clearance certificate and it has an expiry date, so after the certificate has expired a new one is submitted by the vendor.
So i need to know how to have SBO fullfil this requirement ?
Hope it's clear .
Thanks
BonganiHi
I don't have a problem with the query that I know I've got to write , the problem is saving the tax clearance certificate and along side it , its the expiry date.
I'm using South African localization.
Thanks -
Need help with Page Layout and Background Scaling
hello, everyone.
I am in the process of designing a new website for myself,
and while I was researching nicely designed pages to use as
inspiration, I stumbled upon this site:
http://www.jeffsarmiento.com/
obviously, the design is very impressive, but it also
incorporates a lot of web mechanics that I have been trying to
figure out, so I will use this page as an example.
one thing I need help with is backgrounds. as you can see in
the posted website, the creator used a seamlessly tiled paper
texture to display the bulk of his content on. also make not of the
pattern that is located to the left of the paper texture. how do I
create seamless backgrounds like this that will scale to fit any
amount of content or any resolution? I can't imagine that the guy
that made that site created a new size background every time he
made an update, so there has to be an easier way.
the second thing that I am having trouble with is general
site layout. I have read that most sites used series of invisible
tables to organize there content, but when I open the source of
this page in dreamweaver, he was using something different. div
tags? should I be using these? who do I use them? are there any
general layout tips that someone could pass on to me? perhaps a
link to a good tutorial?
please help me. i am very confused.
thanks so much.IMO not a good site to emulate. To wit:
Top background image:
http://www.jeffsarmiento.com/images/bg-top.jpg;
745px
x 350px 137K
Main background image:
http://www.jeffsarmiento.com/images/bg-tile.jpg;
745px x 950px 130K
Total page size: 454K (Check here:
www.websiteoptimization.com)
Website usability experts routinely recommend a maximum page
size of ~80K
Check out the We We Scale @ www.FutureNowInc.com/wewe/ where
they suggest,
"You speak about yourself approximately 0,003 times as often
as you speak
about your customers. Might that have an impact on your
effectiveness?"
That is 100% consistent with the #1 Web Design mistake:
"Believing people
care about you and your web site." or to phrase more
expansively, "Our site
tries to tell you how wonderful we are as a company, but not
how we're going
to solve your problems."
www.sitepoint.com has some excellent books on making a
website actually
attractive and usable at the same time.
Walt
"beWILLdered_" <[email protected]> wrote in
message
news:[email protected]...
> hello, everyone.
> I am in the process of designing a new website for
myself, and while I was
> researching nicely designed pages to use as inspiration,
I stumbled upon
> this
> site:
>
http://www.jeffsarmiento.com/
> obviously, the design is very impressive, but it also
incorporates a lot
> of
> web mechanics that I have been trying to figure out, so
I will use this
> page as
> an example.
> one thing I need help with is backgrounds. as you can
see in the posted
> website, the creator used a seamlessly tiled paper
texture to display the
> bulk
> of his content on. also make not of the pattern that is
located to the
> left of
> the paper texture. how do I create seamless backgrounds
like this that
> will
> scale to fit any amount of content or any resolution? I
can't imagine that
> the
> guy that made that site created a new size background
every time he made
> an
> update, so there has to be an easier way.
> the second thing that I am having trouble with is
general site layout. I
> have
> read that most sites used series of invisible tables to
organize there
> content,
> but when I open the source of this page in dreamweaver,
he was using
> something
> different. div tags? should I be using these? who do I
use them? are there
> any
> general layout tips that someone could pass on to me?
perhaps a link to a
> good
> tutorial?
> please help me. i am very confused.
>
> thanks so much.
> -
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. -
Need help with trim and null function
Hi all,
I need help with a query. I use the trim function to get the first three characters of a string. How do I write my query so if a null value occurs in combination with my trim to say 'Null' in my results?
ThanksHi,
Thanks for the reply. What am I doing wrong?
SELECT trim(SUBSTR(AL1.user_data_text,1,3)),NVL
(AL1.user_data_text,'XX')
FROM Table
I want the XX to appear in the same column as the
trim.The main thing you're doing wrong is not formatting your code. The solution may become obvious if you do.
What you're saying is:
SELECT trim ( SUBSTR (AL1.user_data_text, 1, 3))
, NVL ( AL1.user_data_text, 'XX' )
FROM Tablewhich makes it clear that you're SELECTing two columns, when you only want to have one.
If you want that column to be exactly like the first column you're currently SELECTing, except that when that column is NULL you want it to be 'XX', then you have to apply NVL to that column, like this:
SELECT NVL ( trim ( SUBSTR (AL1.user_data_text, 1, 3))
, 'XX'
FROM Table
Maybe you are looking for
-
How to create a Drop down with values in Module Pool for a screen field.
Hi all, I have created a Screen on which one field is created Say Bank Name. I would like to give some spcific value for this fileld where user can select only seeing in drop down cann't enter. Can anyone tell how can we do it ?
-
T520 500GB 7200RPM Hard Drive Noisy?
My employer gave me a T520 and the keyboard is the best I have ever used. I also own a Thinkpad Edge and like the Accutype keyboard, but I think T520 keyboard is far better. I noticed that the T520 in the configuration I want is under $1000 now and a
-
Where can I buy an iPod Nano 6th generation?
I saw that today the new lineup of iPod Nanos is out, but I really would like to buy the 6th generation (the square one) because of it's clip-on ability. I don't see any available in the Apple Store (online) anymore, and Target doesn't seem to carry
-
Hi, does anyone knows how to add the product id to the Business Data Display (BDD) of CIC? My goal is to allow the agent that is browsing the product on CIC, to check if we have stock of that product by calling an R/3 transaction. I've already confi
-
Mail update & keychain problems
Since installing a large security update yesterday on my MacBook Pro, I have not been able to use Mail. I keep getting the following message: "Mail has been updated. Do you want to allow the new version to access the same keychain items (such as pass